Print this page
make: translate using gettext, rather than the unmaintainable catgets

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/make/bin/read.cc
          +++ new/usr/src/cmd/make/bin/read.cc
↓ open down ↓ 33 lines elided ↑ open up ↑
  34   34   */
  35   35  #include <alloca.h>             /* alloca() */
  36   36  #include <errno.h>              /* errno */
  37   37  #include <fcntl.h>              /* fcntl() */
  38   38  #include <mk/defs.h>
  39   39  #include <mksh/macro.h>         /* expand_value(), expand_macro() */
  40   40  #include <mksh/misc.h>          /* getmem() */
  41   41  #include <mksh/read.h>          /* get_next_block_fn() */
  42   42  #include <sys/uio.h>            /* read() */
  43   43  #include <unistd.h>             /* read(), unlink() */
       44 +#include <libintl.h>
  44   45  
  45   46  
  46   47  /*
  47   48   * typedefs & structs
  48   49   */
  49   50  
  50   51  /*
  51   52   * Static variables
  52   53   */
  53   54  
↓ open down ↓ 56 lines elided ↑ open up ↑
 110  111          Makefile_type           save_makefile_type;
 111  112          Name                    normalized_makefile_name;
 112  113          register wchar_t        *string_start;
 113  114          register wchar_t        *string_end;
 114  115  
 115  116  
 116  117  
 117  118          wchar_t * wcb = get_wstring(makefile_name->string_mb);
 118  119  
 119  120          if (max_include_depth++ >= 40) {
 120      -                fatal(catgets(catd, 1, 66, "Too many nested include statements"));
      121 +                fatal(gettext("Too many nested include statements"));
 121  122          }
 122  123          if (makefile->body.makefile.contents != NULL) {
 123  124                  retmem(makefile->body.makefile.contents);
 124  125          }
 125  126          source->inp_buf =
 126  127            source->inp_buf_ptr =
 127  128              source->inp_buf_end = NULL;
 128  129          source->error_converting = false;
 129  130          makefile->body.makefile.contents = NULL;
 130  131          makefile->body.makefile.size = 0;
↓ open down ↓ 12 lines elided ↑ open up ↑
 143  144                                  // As regularly installed
 144  145                                  asprintf(&path, "%s/../share/lib/make", pfx);
 145  146                                  add_dir_to_path(path, &makefile_path, -1);
 146  147                                  free(path);
 147  148  
 148  149                                  // Tools build
 149  150                                  asprintf(&path, "%s/../../share/", pfx);
 150  151                                  add_dir_to_path(path, &makefile_path, -1);
 151  152                                  free(path);
 152  153                                      
 153      -                                add_dir_to_path(NOCATGETS("/usr/share/lib/make"),
      154 +                                add_dir_to_path("/usr/share/lib/make",
 154  155                                                  &makefile_path,
 155  156                                                  -1);
 156      -                                add_dir_to_path(NOCATGETS("/etc/default"),
      157 +                                add_dir_to_path("/etc/default",
 157  158                                                  &makefile_path,
 158  159                                                  -1);
 159  160  
 160  161                                  free(pfx);
 161  162                          }
 162  163                          save_makefile_type = makefile_type;
 163  164                          makefile_type = reading_nothing;
 164  165                          if (doname(makefile_name, true, false) == build_dont_know) {
 165  166                                  /* Try normalized filename */
 166  167                                  string_start=get_wstring(makefile_name->string_mb);
↓ open down ↓ 30 lines elided ↑ open up ↑
 197  198                          }
 198  199                          makefile_type = save_makefile_type;
 199  200                  }
 200  201                  source->string.free_after_use = false;
 201  202                  source->previous = NULL;
 202  203                  source->already_expanded = false;
 203  204                  /* Lock the file for read, but not when -n. */
 204  205                  if (lock_makefile && 
 205  206                      !do_not_exec_rule) {
 206  207  
 207      -                         make_state_lockfile = getmem(strlen(make_state->string_mb) + strlen(NOCATGETS(".lock")) + 1);
      208 +                         make_state_lockfile = getmem(strlen(make_state->string_mb) + strlen(".lock") + 1);
 208  209                           (void) sprintf(make_state_lockfile,
 209      -                                                NOCATGETS("%s.lock"),
      210 +                                                "%s.lock",
 210  211                                                  make_state->string_mb);
 211  212                          (void) file_lock(make_state->string_mb,
 212  213                                           make_state_lockfile,
 213  214                                           (int *) &make_state_locked,
 214  215                                           0);
 215  216                          if(!make_state_locked) {
 216      -                                printf(NOCATGETS("-- NO LOCKING for read\n"));
      217 +                                printf("-- NO LOCKING for read\n");
 217  218                                  retmem_mb(make_state_lockfile);
 218  219                                  make_state_lockfile = 0;
 219  220                                  return failed;
 220  221                          }
 221  222                  }
 222  223                  if (makefile->body.makefile.contents == NULL) {
 223  224                          save_makefile_type = makefile_type;
 224  225                          makefile_type = reading_nothing;
 225  226                          if ((doname_it) &&
 226  227                              (doname(makefile_name, true, false) == build_failed)) {
 227  228                                  if (complain) {
 228  229                                          (void) fprintf(stderr,
 229      -                                                       catgets(catd, 1, 237, "make: Couldn't make `%s'\n"),
      230 +                                                       gettext("make: Couldn't make `%s'\n"),
 230  231                                                         makefile_name->string_mb);
 231  232                                  }
 232  233                                  max_include_depth--;
 233  234                                  makefile_type = save_makefile_type;
 234  235                                  return failed;
 235  236                          }
 236  237                          makefile_type = save_makefile_type;
 237  238                          //
 238  239                          // Before calling exists() make sure that we have the right timestamp
 239  240                          //
 240  241                          makefile_name->stat.time = file_no_time;
 241  242  
 242  243                          if (exists(makefile_name) == file_doesnt_exist) {
 243  244                                  if (complain ||
 244  245                                      (makefile_name->stat.stat_errno != ENOENT)) {
 245  246                                          if (must_exist) {
 246      -                                                fatal(catgets(catd, 1, 68, "Can't find `%s': %s"),
      247 +                                                fatal(gettext("Can't find `%s': %s"),
 247  248                                                        makefile_name->string_mb,
 248  249                                                        errmsg(makefile_name->
 249  250                                                               stat.stat_errno));
 250  251                                          } else {
 251      -                                                warning(catgets(catd, 1, 69, "Can't find `%s': %s"),
      252 +                                                warning(gettext("Can't find `%s': %s"),
 252  253                                                          makefile_name->string_mb,
 253  254                                                          errmsg(makefile_name->
 254  255                                                                 stat.stat_errno));
 255  256                                          }
 256  257                                  }
 257  258                                  max_include_depth--;
 258  259                                  if(make_state_locked && (make_state_lockfile != NULL)) {
 259  260                                          (void) unlink(make_state_lockfile);
 260  261                                          retmem_mb(make_state_lockfile);
 261  262                                          make_state_lockfile = NULL;
↓ open down ↓ 24 lines elided ↑ open up ↑
 286  287                                  *dpp = dp;
 287  288                          }
 288  289                          source->fd = open_vroot(makefile_name->string_mb,
 289  290                                                  O_RDONLY,
 290  291                                                  0,
 291  292                                                  NULL,
 292  293                                                  VROOT_DEFAULT);
 293  294                          if (source->fd < 0) {
 294  295                                  if (complain || (errno != ENOENT)) {
 295  296                                          if (must_exist) {
 296      -                                                fatal(catgets(catd, 1, 70, "Can't open `%s': %s"),
      297 +                                                fatal(gettext("Can't open `%s': %s"),
 297  298                                                        makefile_name->string_mb,
 298  299                                                        errmsg(errno));
 299  300                                          } else {
 300      -                                                warning(catgets(catd, 1, 71, "Can't open `%s': %s"),
      301 +                                                warning(gettext("Can't open `%s': %s"),
 301  302                                                          makefile_name->string_mb,
 302  303                                                          errmsg(errno));
 303  304                                          }
 304  305                                  }
 305  306                                  max_include_depth--;
 306  307                                  return failed;
 307  308                          }
 308  309                          (void) fcntl(source->fd, F_SETFD, 1);
 309  310                          orig_makefile->body.makefile.contents =
 310  311                            makefile->body.makefile.contents =
↓ open down ↓ 21 lines elided ↑ open up ↑
 332  333                  file_being_read = wcb;
 333  334          } else {
 334  335                  char            *stdin_text_p;
 335  336                  char            *stdin_text_end;
 336  337                  char            *stdin_buffer_start;
 337  338                  char            *stdin_buffer_end;
 338  339                  char            *p_mb;
 339  340                  int             num_mb_chars;
 340  341                  size_t          num_wc_chars;
 341  342  
 342      -                MBSTOWCS(wcs_buffer, NOCATGETS("Standard in"));
      343 +                MBSTOWCS(wcs_buffer, "Standard in");
 343  344                  makefile_name = GETNAME(wcs_buffer, FIND_LENGTH);
 344  345                  /*
 345  346                   * Memory to read standard in, then convert it
 346  347                   * to wide char strings.
 347  348                   */
 348  349                  stdin_buffer_start =
 349  350                    stdin_text_p = getmem(length = 1024);
 350  351                  stdin_buffer_end = stdin_text_p + length;
 351      -                MBSTOWCS(wcs_buffer, NOCATGETS("standard input"));
      352 +                MBSTOWCS(wcs_buffer, "standard input");
 352  353                  file_being_read = (wchar_t *) wsdup(wcs_buffer);
 353  354                  line_number = 0;
 354  355                  while ((n = read(fileno(stdin),
 355  356                                   stdin_text_p,
 356  357                                   length)) > 0) {
 357  358                          length -= n;
 358  359                          stdin_text_p += n;
 359  360                          if (length == 0) {
 360  361                                  p_mb = getmem(length = 1024 +
 361  362                                                (stdin_buffer_end -
↓ open down ↓ 5 lines elided ↑ open up ↑
 367  368                                  retmem_mb(stdin_buffer_start);
 368  369                                  stdin_text_p = p_mb +
 369  370                                    (stdin_buffer_end - stdin_buffer_start);
 370  371                                  stdin_buffer_start = p_mb;
 371  372                                  stdin_buffer_end =
 372  373                                    stdin_buffer_start + length;
 373  374                                  length = 1024;
 374  375                          }
 375  376                  }
 376  377                  if (n < 0) {
 377      -                        fatal(catgets(catd, 1, 72, "Error reading standard input: %s"),
      378 +                        fatal(gettext("Error reading standard input: %s"),
 378  379                                errmsg(errno));
 379  380                  }
 380  381                  stdin_text_p = stdin_buffer_start;
 381  382                  stdin_text_end = stdin_buffer_end - length;
 382  383                  num_mb_chars = stdin_text_end - stdin_text_p;
 383  384  
 384  385                  /*
 385  386                   * Now, convert the sequence of multibyte chars into
 386  387                   * a sequence of corresponding wide character codes.
 387  388                   */
↓ open down ↓ 10 lines elided ↑ open up ↑
 398  399                                          stdin_text_p,
 399  400                                          num_mb_chars);
 400  401                  if ((int) num_wc_chars >= 0) {
 401  402                          source->string.text.end =
 402  403                            source->string.text.p + num_wc_chars;
 403  404                  }
 404  405                  (void) retmem_mb(stdin_text_p);
 405  406          }
 406  407          line_number = 1;
 407  408          if (trace_reader) {
 408      -                (void) printf(catgets(catd, 1, 73, ">>>>>>>>>>>>>>>> Reading makefile %s\n"),
      409 +                (void) printf(gettext(">>>>>>>>>>>>>>>> Reading makefile %s\n"),
 409  410                                makefile_name->string_mb);
 410  411          }
 411  412          parse_makefile(makefile_name, source);
 412  413          if (trace_reader) {
 413      -                (void) printf(catgets(catd, 1, 74, ">>>>>>>>>>>>>>>> End of makefile %s\n"),
      414 +                (void) printf(gettext(">>>>>>>>>>>>>>>> End of makefile %s\n"),
 414  415                                makefile_name->string_mb);
 415  416          }
 416  417          if(file_being_read) {
 417  418                  retmem(file_being_read);
 418  419          }
 419  420          file_being_read = previous_file_being_read;
 420  421          line_number = previous_line_number;
 421  422          makefile_type = reading_nothing;
 422  423          max_include_depth--;
 423  424          if (make_state_locked) {
↓ open down ↓ 298 lines elided ↑ open up ↑
 722  723  
 723  724          /* We now have a line we can start reading */
 724  725   line_evald:
 725  726          if (source == NULL) {
 726  727                  GOTO_STATE(exit_state);
 727  728          }
 728  729          /* Check if this is an include command */
 729  730          if ((makefile_type == reading_makefile) &&
 730  731              !source->already_expanded) {
 731  732              if (include_space[0] == (int) nul_char) {
 732      -                MBSTOWCS(include_space, NOCATGETS("include "));
 733      -                MBSTOWCS(include_tab, NOCATGETS("include\t"));
      733 +                MBSTOWCS(include_space, "include ");
      734 +                MBSTOWCS(include_tab, "include\t");
 734  735              }
 735  736              if ((IS_WEQUALN(source_p, include_space, 8)) ||
 736  737                  (IS_WEQUALN(source_p, include_tab, 8))) {
 737  738                  source_p += 7;
 738  739                  if (iswspace(*source_p)) {
 739  740                          Makefile_type save_makefile_type;
 740  741                          wchar_t         *name_start;
 741  742                          int             name_length;
 742  743  
 743  744                          /*
↓ open down ↓ 122 lines elided ↑ open up ↑
 866  867                          UNCACHE_SOURCE();
 867  868                          /* Read the file */
 868  869                          save_makefile_type = makefile_type;
 869  870                          if (read_simple_file(makefile_name,
 870  871                                               true,
 871  872                                               true,
 872  873                                               true,
 873  874                                               false,
 874  875                                               true,
 875  876                                               false) == failed) {
 876      -                                fatal_reader(catgets(catd, 1, 75, "Read of include file `%s' failed"),
      877 +                                fatal_reader(gettext("Read of include file `%s' failed"),
 877  878                                               makefile_name->string_mb);
 878  879                          }
 879  880                          makefile_type = save_makefile_type;
 880  881                          do_not_exec_rule = save_do_not_exec_rule;
 881  882                          CACHE_SOURCE(0);
 882  883                          goto start_new_line;
 883  884                  } else {
 884  885                          source_p -= 7;
 885  886                  }
 886  887              } else {
↓ open down ↓ 165 lines elided ↑ open up ↑
1052 1053                          /* Get more text to read */
1053 1054                          GET_NEXT_BLOCK(source);
1054 1055                          string_start = source_p;
1055 1056                          source_p--;
1056 1057                          if (source == NULL) {
1057 1058                                  GOTO_STATE(on_eoln_state);
1058 1059                          }
1059 1060                          break;
1060 1061                  case newline_char:
1061 1062                          if (paren_count > 0) {
1062      -                                fatal_reader(catgets(catd, 1, 76, "Unmatched `(' on line"));
     1063 +                                fatal_reader(gettext("Unmatched `(' on line"));
1063 1064                          }
1064 1065                          if (brace_count > 0) {
1065      -                                fatal_reader(catgets(catd, 1, 77, "Unmatched `{' on line"));
     1066 +                                fatal_reader(gettext("Unmatched `{' on line"));
1066 1067                          }
1067 1068                          source_p++;
1068 1069                          /* Enter name */
1069 1070                          current_names = enter_name(&name_string,
1070 1071                                                     macro_seen_in_string,
1071 1072                                                     string_start,
1072 1073                                                     source_p - 1,
1073 1074                                                     current_names,
1074 1075                                                     &extra_names,
1075 1076                                                     &target_group_seen);
↓ open down ↓ 32 lines elided ↑ open up ↑
1108 1109                                  goto resume_name_scan;
1109 1110                          } else {
1110 1111                                  string_start = source_p;
1111 1112                                  break;
1112 1113                          }
1113 1114                          break;
1114 1115                  case numbersign_char:
1115 1116                          if (paren_count + brace_count > 0) {
1116 1117                                  break;
1117 1118                          }
1118      -                        fatal_reader(catgets(catd, 1, 78, "Unexpected comment seen"));
     1119 +                        fatal_reader(gettext("Unexpected comment seen"));
1119 1120                  case dollar_char:
1120 1121                          if (source->already_expanded) {
1121 1122                                  break;
1122 1123                          }
1123 1124                          /* Save the identifier so far */
1124 1125                          if (source_p != string_start) {
1125 1126                                  if (!macro_seen_in_string) {
1126 1127                                          INIT_STRING_FROM_STACK(name_string,
1127 1128                                                                 name_buffer);
1128 1129                                  }
↓ open down ↓ 14 lines elided ↑ open up ↑
1143 1144                                                            source);
1144 1145                          }
1145 1146                          CACHE_SOURCE(1);
1146 1147                          string_start = source_p + 1;
1147 1148                          break;
1148 1149                  case parenleft_char:
1149 1150                          paren_count++;
1150 1151                          break;
1151 1152                  case parenright_char:
1152 1153                          if (--paren_count < 0) {
1153      -                                fatal_reader(catgets(catd, 1, 79, "Unmatched `)' on line"));
     1154 +                                fatal_reader(gettext("Unmatched `)' on line"));
1154 1155                          }
1155 1156                          break;
1156 1157                  case braceleft_char:
1157 1158                          brace_count++;
1158 1159                          break;
1159 1160                  case braceright_char:
1160 1161                          if (--brace_count < 0) {
1161      -                                fatal_reader(catgets(catd, 1, 80, "Unmatched `}' on line"));
     1162 +                                fatal_reader(gettext("Unmatched `}' on line"));
1162 1163                          }
1163 1164                          break;
1164 1165                  case ampersand_char:
1165 1166                  case greater_char:
1166 1167                  case bar_char:
1167 1168                          if (paren_count + brace_count == 0) {
1168 1169                                  source_p++;
1169 1170                          }
1170 1171                          /* Fall into */
1171 1172                  case tab_char:
↓ open down ↓ 24 lines elided ↑ open up ↑
1196 1197  /** POSIX **/
1197 1198  #if 0
1198 1199                          if(posix) {
1199 1200                            emptycount = 0;
1200 1201                          }
1201 1202  #endif
1202 1203  /** END POSIX **/
1203 1204                          /* End of the target list. We now start reading */
1204 1205                          /* dependencies or a conditional assignment */
1205 1206                          if (separator != none_seen) {
1206      -                                fatal_reader(catgets(catd, 1, 81, "Extra `:', `::', or `:=' on dependency line"));
     1207 +                                fatal_reader(gettext("Extra `:', `::', or `:=' on dependency line"));
1207 1208                          }
1208 1209                          /* Enter the last target */
1209 1210                          if ((string_start != source_p) ||
1210 1211                              macro_seen_in_string) {
1211 1212                                  current_names =
1212 1213                                    enter_name(&name_string,
1213 1214                                               macro_seen_in_string,
1214 1215                                               string_start,
1215 1216                                               source_p,
1216 1217                                               current_names,
↓ open down ↓ 11 lines elided ↑ open up ↑
1228 1229                          switch (*++source_p) {
1229 1230                          case nul_char:
1230 1231                                  GET_NEXT_BLOCK(source);
1231 1232                                  source_p--;
1232 1233                                  if (source == NULL) {
1233 1234                                          GOTO_STATE(enter_dependencies_state);
1234 1235                                  }
1235 1236                                  goto scan_colon_label;
1236 1237                          case equal_char:
1237 1238                                  if(svr4) {
1238      -                                  fatal_reader(catgets(catd, 1, 82, "syntax error"));
     1239 +                                  fatal_reader(gettext("syntax error"));
1239 1240                                  }
1240 1241                                  separator = conditional_seen;
1241 1242                                  source_p++;
1242 1243                                  current_names = &depes;
1243 1244                                  GOTO_STATE(scan_name_state);
1244 1245                          case colon_char:
1245 1246                                  separator = two_colon;
1246 1247                                  source_p++;
1247 1248                                  break;
1248 1249                          default:
↓ open down ↓ 2 lines elided ↑ open up ↑
1251 1252                          current_names = &depes;
1252 1253                          on_eoln_state = enter_dependencies_state;
1253 1254                          GOTO_STATE(scan_name_state);
1254 1255                  case semicolon_char:
1255 1256                          if (paren_count + brace_count > 0) {
1256 1257                                  break;
1257 1258                          }
1258 1259                          /* End of reading names. Start reading the rule */
1259 1260                          if ((separator != one_colon) &&
1260 1261                              (separator != two_colon)) {
1261      -                                fatal_reader(catgets(catd, 1, 83, "Unexpected command seen"));
     1262 +                                fatal_reader(gettext("Unexpected command seen"));
1262 1263                          }
1263 1264                          /* Enter the last dependency */
1264 1265                          if ((string_start != source_p) ||
1265 1266                              macro_seen_in_string) {
1266 1267                                  current_names =
1267 1268                                    enter_name(&name_string,
1268 1269                                               macro_seen_in_string,
1269 1270                                               string_start,
1270 1271                                               source_p,
1271 1272                                               current_names,
↓ open down ↓ 106 lines elided ↑ open up ↑
1378 1379                                  source_p--;
1379 1380                                  string_start = source_p;
1380 1381                                  if (source == NULL) {
1381 1382                                          GOTO_STATE(illegal_eoln_state);
1382 1383                                  }
1383 1384                                  goto scan_append;
1384 1385                          case equal_char:
1385 1386                                  if(!svr4) {
1386 1387                                    append = true;
1387 1388                                  } else {
1388      -                                  fatal_reader(catgets(catd, 1, 84, "Must be a separator on rules"));
     1389 +                                  fatal_reader(gettext("Must be a separator on rules"));
1389 1390                                  }
1390 1391                                  break;
1391 1392                          default:
1392 1393                                  /* The "+" just starts a regular name. */
1393 1394                                  /* Start reading that name */
1394 1395                                  goto resume_name_scan;
1395 1396                          }
1396 1397                          /* Fall into */
1397 1398                  case equal_char:
1398 1399                          if (paren_count + brace_count > 0) {
↓ open down ↓ 6 lines elided ↑ open up ↑
1405 1406                                  separator = equal_seen;
1406 1407                                  on_eoln_state = enter_equal_state;
1407 1408                                  break;
1408 1409                          case conditional_seen:
1409 1410                                  on_eoln_state = enter_conditional_state;
1410 1411                                  break;
1411 1412                          default:
1412 1413                                  /* Reader must special check for "MACRO:sh=" */
1413 1414                                  /* notation */
1414 1415                                  if (sh_name == NULL) {
1415      -                                        MBSTOWCS(wcs_buffer, NOCATGETS("sh"));
     1416 +                                        MBSTOWCS(wcs_buffer, "sh");
1416 1417                                          sh_name = GETNAME(wcs_buffer, FIND_LENGTH);
1417      -                                        MBSTOWCS(wcs_buffer, NOCATGETS("shell"));
     1418 +                                        MBSTOWCS(wcs_buffer, "shell");
1418 1419                                          shell_name = GETNAME(wcs_buffer, FIND_LENGTH);
1419 1420                                  }
1420 1421  
1421 1422                                  if (!macro_seen_in_string) {
1422 1423                                          INIT_STRING_FROM_STACK(name_string,
1423 1424                                                         name_buffer);
1424 1425                                  }
1425 1426                                  append_string(string_start,
1426 1427                                                &name_string,
1427 1428                                                source_p - string_start
↓ open down ↓ 48 lines elided ↑ open up ↑
1476 1477                                                        &macro_name,
1477 1478                                                        FIND_LENGTH);
1478 1479                                          target.names[0] =
1479 1480                                            GETNAME(macro_name.buffer.start,
1480 1481                                                    FIND_LENGTH);
1481 1482                                          separator = equal_seen;
1482 1483                                          on_eoln_state = enter_equal_state;
1483 1484                                          break;
1484 1485                                  } 
1485 1486                                  if(svr4) {
1486      -                                  fatal_reader(catgets(catd, 1, 85, "syntax error"));
     1487 +                                  fatal_reader(gettext("syntax error"));
1487 1488                                  }
1488 1489                                  else {
1489      -                                  fatal_reader(catgets(catd, 1, 86, "Macro assignment on dependency line"));
     1490 +                                  fatal_reader(gettext("Macro assignment on dependency line"));
1490 1491                                  }
1491 1492                          }
1492 1493                          if (append) {
1493 1494                                  source_p--;
1494 1495                          }
1495 1496                          /* Enter the macro name */
1496 1497                          if ((string_start != source_p) ||
1497 1498                              macro_seen_in_string) {
1498 1499                                  current_names =
1499 1500                                    enter_name(&name_string,
↓ open down ↓ 478 lines elided ↑ open up ↑
1978 1979                                            macro_value,
1979 1980                                            append);
1980 1981                  }
1981 1982          }
1982 1983          goto start_new_line;
1983 1984  
1984 1985  /****************************************************************
1985 1986   *      Error states
1986 1987   */
1987 1988  case illegal_bytes_state:
1988      -        fatal_reader(catgets(catd, 1, 340, "Invalid byte sequence"));
     1989 +        fatal_reader(gettext("Invalid byte sequence"));
1989 1990  case illegal_eoln_state:
1990 1991          if (line_number > 1) {
1991 1992                  if (line_started_with_space == (line_number - 1)) {
1992 1993                          line_number--;
1993      -                        fatal_reader(catgets(catd, 1, 90, "Unexpected end of line seen\n\t*** missing separator (did you mean TAB instead of 8 spaces?)"));
     1994 +                        fatal_reader(gettext("Unexpected end of line seen\n\t*** missing separator (did you mean TAB instead of 8 spaces?)"));
1994 1995                  }
1995 1996          }
1996      -        fatal_reader(catgets(catd, 1, 87, "Unexpected end of line seen"));
     1997 +        fatal_reader(gettext("Unexpected end of line seen"));
1997 1998  case poorly_formed_macro_state:
1998      -        fatal_reader(catgets(catd, 1, 88, "Badly formed macro assignment"));
     1999 +        fatal_reader(gettext("Badly formed macro assignment"));
1999 2000  case exit_state:
2000 2001          return;
2001 2002  default:
2002      -        fatal_reader(catgets(catd, 1, 89, "Internal error. Unknown reader state"));
     2003 +        fatal_reader(gettext("Internal error. Unknown reader state"));
2003 2004  }
2004 2005  }
2005 2006  
2006 2007  /*
2007 2008   *      push_macro_value(bp, buffer, size, source)
2008 2009   *
2009 2010   *      Macro and function that evaluates one macro
2010 2011   *      and makes the reader read from the value of it
2011 2012   *
2012 2013   *      Return value:
↓ open down ↓ 67 lines elided ↑ open up ↑
2080 2081          Chain                   target_group_member;
2081 2082          Percent                 percent_ptr;
2082 2083  
2083 2084          for (; target != NULL; target = target->next) {
2084 2085                  for (i = 0; i < target->used; i++) {
2085 2086                          if (target->names[i] != NULL) {
2086 2087                                  if (target_group_seen) {
2087 2088                                          target_group_member =
2088 2089                                            find_target_groups(target, i, reset);
2089 2090                                          if(target_group_member == NULL) {
2090      -                                                fatal_reader(catgets(catd, 1, 328, "Unexpected '+' on dependency line"));
     2091 +                                                fatal_reader(gettext("Unexpected '+' on dependency line"));
2091 2092                                          }
2092 2093                                  }
2093 2094                                  reset = false;
2094 2095  
2095 2096                                  /* If we saw it in the makefile it must be
2096 2097                                   * a file */
2097 2098                                  target->names[i]->stat.is_file = true;
2098 2099                                  /* Make sure that we use dependencies 
2099 2100                                   * entered for makefiles */
2100 2101                                  target->names[i]->state = build_dont_know;
↓ open down ↓ 46 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX