Ignore:
Timestamp:
Mar 12, 2006, 6:02:46 PM (19 years ago)
Author:
bird
Message:

applied OS/2 patches (manually).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/texinfo/makeinfo/makeinfo.c

    r2617 r2619  
    543543  int reading_from_stdin = 0;
    544544
     545#ifdef __EMX__
     546  _response (&argc, &argv);
     547  _wildcard (&argc, &argv);
     548  if (argc == 1 && isatty (STDIN_FILENO))
     549    usage (0);
     550#endif
     551
    545552#ifdef HAVE_SETLOCALE
    546553  /* Do not use LC_ALL, because LC_NUMERIC screws up the scanf parsing
     
    658665            {
    659666              macro_expansion_filename = optarg;
    660               macro_expansion_output_stream
    661                 = strcmp (optarg, "-") == 0 ? stdout : fopen (optarg, "w");
     667#if defined(__EMX__)
     668              if (strcmp (optarg, "-") == 0)
     669                {
     670                  macro_expansion_output_stream = stdout;
     671                  freopen(NULL, FOPEN_WBIN, stdout);
     672                }
     673              else
     674                macro_expansion_output_stream = fopen (optarg, FOPEN_WBIN);
     675#else
     676              macro_expansion_output_stream =
     677                  strcmp (optarg, "-") == 0 ? stdout : fopen (optarg, "w");
     678#endif
    662679              if (!macro_expansion_output_stream)
    663680                error (_("%s: could not open macro expansion output `%s'"),
     
    9991016          sprintf (end_block, "\n%cend ", COMMAND_PREFIX);
    10001017          if (executing_string && strstr (string, end_block))
    1001             line_error (_("Multiline command %c%s used improperly"), 
     1018            line_error (_("Multiline command %c%s used improperly"),
    10021019                COMMAND_PREFIX, command);
    10031020          else
     
    16321649        real_output_filename = xstrdup (real_output_filename);
    16331650
    1634       output_stream = fopen (real_output_filename, "w");
     1651#if defined(__EMX__)
     1652     output_stream = fopen (real_output_filename, FOPEN_WBIN);
     1653#else
     1654     output_stream = fopen (real_output_filename, "w");
     1655#endif
    16351656    }
    16361657
     
    33413362          add_word_args ("\"%s\"", fullname);
    33423363          add_html_elt (" alt=");
    3343           add_word_args ("\"%s\">", 
     3364          add_word_args ("\"%s\">",
    33443365              escape_string (*alt_arg ? text_expansion (alt_arg) : fullname));
    33453366
     
    33783399          strcpy (txtname, name_arg);
    33793400          strcat (txtname, ".txt");
    3380           image_file = fopen (txtname, "r");
     3401          image_file = fopen (txtname, FOPEN_RTXT); /* bird: text */
    33813402          if (image_file == NULL)
    33823403            {
     
    33843405                                               include_files_path, &file_info);
    33853406              if (txtpath != NULL)
    3386                 image_file = fopen (txtpath, "r");
     3407                image_file = fopen (txtpath, FOPEN_RTXT); /* bird: text */
    33873408            }
    33883409
     
    34413462                  if (image_in_brackets)
    34423463                    add_char (']');
    3443                  
     3464
    34443465                  if (use_magic_cookie)
    34453466                    add_char ('"');
     
    36823703             expand to a context-sensitive macro (e.g. @xref) and produce
    36833704             spurious warnings */
    3684           input_text_offset++; 
     3705          input_text_offset++;
    36853706          execute_string ("%s", value);
    36863707          input_text_offset--;
Note: See TracChangeset for help on using the changeset viewer.