--- xgettext.c.old 2009-01-02 10:28:55.000000000 +0100 +++ xgettext.c 2009-01-02 10:39:16.000000000 +0100 @@ -201,6 +201,7 @@ { "exclude-file", required_argument, NULL, 'x' }, { "extract-all", no_argument, NULL, 'a' }, { "files-from", required_argument, NULL, 'f' }, + { "file-location", no_argument, &line_comment, 2 }, { "flag", required_argument, NULL, CHAR_MAX + 8 }, { "force-po", no_argument, &force_po, 1 }, { "foreign-user", no_argument, NULL, CHAR_MAX + 2 }, @@ -328,7 +329,7 @@ init_flag_table_php (); while ((optchar = getopt_long (argc, argv, - "ac::Cd:D:eEf:Fhijk::l:L:m::M::no:p:sTVw:x:", + "ac::Cd:D:eEf:Fhijk::l:lL:m::M::no:p:sTVw:x:", long_options, NULL)) != EOF) switch (optchar) { @@ -420,7 +421,8 @@ some_additional_keywords = true; break; case 'l': - /* Accepted for backward compatibility with 0.10.35. */ + /* Compatibility: -l was --string-limit in 0.10.35. */ + line_comment = 2; break; case 'L': language = optarg; @@ -2240,8 +2242,10 @@ warn_format_string (is_format, mp->msgid, pos, "msgid"); /* Remember where we saw this msgid. */ - if (line_comment) + if (line_comment == 1) message_comment_filepos (mp, pos->file_name, pos->line_number); + else if (line_comment == 2) + message_comment_filepos (mp, pos->file_name, (size_t)-1); /* Tell the lexer to reset its comment buffer, so that the next message gets the correct comments. */ --- read-catalog.h.orig 2009-01-02 10:51:06.000000000 +0100 +++ read-catalog.h 2009-01-02 10:31:04.000000000 +0100 @@ -163,8 +163,9 @@ default_catalog_reader_alloc (default_catalog_reader_class_ty *method_table); -/* If nonzero, remember comments for file name and line number for each - msgid, if present in the reference input. Defaults to true. */ +/* If set to one, remember comments for file name and line number for each + msgid, if present in the reference input. If set to two, remembers only + the file name. Defaults to one. */ extern DLL_VARIABLE int line_comment; /* If false, duplicate msgids in the same domain and file generate an error.