home *** CD-ROM | disk | FTP | other *** search
- *** orig/texinfo-.1/makeinfo/makeinfo.c Sun Aug 29 18:41:40 1993
- --- src/texinfo-.1/makeinfo/makeinfo.c Sun Aug 29 19:26:02 1993
- ***************
- *** 1040,1046 ****
- --- 1040,1050 ----
-
- filename = fullpath;
-
- + #ifdef __MSDOS__
- + file = open (filename, O_RDONLY | O_TEXT); /* allows DOS-Edited cr/lf'ed */
- + #else /* files to be read (HBB) */
- file = open (filename, O_RDONLY);
- + #endif
- if (file < 0)
- goto error_exit;
-
- ***************
- *** 1051,1064 ****
- readable bytes is always less than this value. The arcane
- mysteries of VMS/RMS are too much to probe, so this hack
- suffices to make things work. */
- ! #if defined (VMS)
- while ((n = read (file, result + count, fileinfo.st_size)) > 0)
- count += n;
- if (n == -1)
- ! #else /* !VMS */
- count = fileinfo.st_size;
- if (read (file, result, fileinfo.st_size) != fileinfo.st_size)
- ! #endif /* !VMS */
- error_exit:
- {
- if (result)
- --- 1055,1068 ----
- readable bytes is always less than this value. The arcane
- mysteries of VMS/RMS are too much to probe, so this hack
- suffices to make things work. */
- ! #if defined (VMS) || defined (__MSDOS__)
- while ((n = read (file, result + count, fileinfo.st_size)) > 0)
- count += n;
- if (n == -1)
- ! #else /* !VMS || __MSDOS__ */
- count = fileinfo.st_size;
- if (read (file, result, fileinfo.st_size) != fileinfo.st_size)
- ! #endif /* !VMS || __MSDOS__ */
- error_exit:
- {
- if (result)
- ***************
- *** 1800,1806 ****
- --- 1804,1814 ----
- if (!real_output_filename)
- real_output_filename = expand_filename (output_filename, name);
-
- + #ifdef __MSDOS__
- + output_stream = fopen (real_output_filename, "wb");
- + #else
- output_stream = fopen (real_output_filename, "w");
- + #endif
- }
-
- if (output_stream == NULL)
- ***************
- *** 2771,2776 ****
- --- 2779,2785 ----
- return (-1);
- }
-
- + #ifndef __MSDOS__
- /* Whoops, Unix doesn't have stricmp. */
-
- /* Case independent string compare. */
- ***************
- *** 2794,2799 ****
- --- 2803,2809 ----
- return (ch1 - ch2);
- }
- }
- + #endif
-
- enum insertion_type { menu, quotation, lisp, smalllisp, example,
- smallexample, display, itemize, format, enumerate, cartouche, table,
- ***************
- *** 4610,4615 ****
- --- 4620,4633 ----
-
- split_filename = (char *) xmalloc
- (10 + strlen (root_pathname) + strlen (root_filename));
- + #if defined (__MSDOS__)
- + sprintf
- + (split_filename,
- + "%s%s.%d", root_pathname, root_filename, which_file);
- +
- + fd = open
- + (split_filename, O_WRONLY | O_TRUNC | O_CREAT | O_BINARY, 0666);
- + #else /* __MSDOS__ */
- sprintf
- (split_filename,
- "%s%s-%d", root_pathname, root_filename, which_file);
- ***************
- *** 4616,4621 ****
- --- 4634,4640 ----
-
- fd = open
- (split_filename, O_WRONLY | O_TRUNC | O_CREAT, 0666);
- + #endif /* __MSDOS__ */
-
- if ((fd < 0) ||
- (write (fd, the_header, header_size) != header_size) ||
- ***************
- *** 4636,4643 ****
- --- 4655,4667 ----
- indirect_info += strlen (indirect_info);
- }
-
- + #if defined (__MSDOS__)
- + sprintf (indirect_info, "%s.%d: %d\n",
- + root_filename, which_file, file_top);
- + #else /* __MSDOS__ */
- sprintf (indirect_info, "%s-%d: %d\n",
- root_filename, which_file, file_top);
- + #endif /* __MSDOS__ */
-
- free (split_filename);
- indirect_info += strlen (indirect_info);
- ***************
- *** 4651,4657 ****
- --- 4675,4685 ----
- /* We have sucessfully created the subfiles. Now write out the
- original again. We must use `output_stream', or
- write_tag_table_indirect () won't know where to place the output. */
- + #ifdef __MSDOS__
- + output_stream = fopen (filename, "wb");
- + #else
- output_stream = fopen (filename, "w");
- + #endif
- if (!output_stream)
- {
- perror (filename);
-