wmc: Store input file location for each individual message.

This commit is contained in:
Alexandre Julliard 2011-01-24 20:05:34 +01:00
parent 46ecc16deb
commit 45dc5bf6b2
2 changed files with 5 additions and 1 deletions

View File

@ -441,6 +441,8 @@ static lanmsg_t *new_lanmsg(lan_cp_t *lcp, WCHAR *msg)
lmp->cp = lcp->codepage;
lmp->msg = msg;
lmp->len = unistrlen(msg) + 1; /* Include termination */
lmp->file = input_name;
lmp->line = line_number;
if(lmp->len > 4096)
mcy_warning("Message exceptionally long; might be a missing termination\n");
return lmp;
@ -522,7 +524,7 @@ static void test_id(int id)
static int check_languages(node_t *head)
{
static const char err_missing[] = "Missing definition for language 0x%x; MessageID %d, facility 0x%x, severity 0x%x";
static const char err_missing[] = "Missing definition for language 0x%x; MessageID %d, facility 0x%x, severity 0x%x\n";
node_t *ndp;
int nm = 0;
msg_t *msg = NULL;

View File

@ -73,6 +73,8 @@ typedef struct lanmsg {
int cp; /* Codepage of message */
WCHAR *msg; /* Message text */
int len; /* Message length including trailing '\0' */
const char *file; /* File location for definition */
int line;
} lanmsg_t;
typedef struct msg {