extern void funny_core_dump();
#endif
-#ifdef MSDOS
#ifdef BUILDNAMEDIRECT
-// similar to concat, but AVOIDS using malloc, pass in place to put result
-char *xconcat (char *buffer, char *s1, char *s2)
+char * xconcat (char *buffer, char *s1, char *s2)
{
int n1 = strlen(s1);
int n2 = strlen(s2);
return buffer;
}
-// similar to concat3, but avoids using malloc, pass in place to put result
-char *xconcat3 (char *buffer, char *s1, char *s2, char *s3)
+char * xconcat3 (char *buffer, char *s1, char *s2, char *s3)
{
int n1 = strlen(s1);
int n2 = strlen(s2);
}
#endif
-#endif
-
-#ifdef MSDOS
// separated out 1996/Jan/20 to make easier to read
// assumes path does not end in PATH_SEP
void patch_in_path (unsigned char *buffer, unsigned char *name, unsigned char *path)
return 1;
}
-#endif /* end of MSDOS */
+
// Following works on null-terminated strings
void check_short_name (unsigned char *s)
funny_core_dump();
#endif
-#ifdef MSDOS
if (return_flag)
{
if (strcmp(fopen_mode, "r") == 0)
fopen_mode = "rb"; /* so can catch `return' bkph */
}
-#endif /* MSDOS */
- name_of_file[name_length + 1] = '\0'; /* null terminate */
+ name_of_file[name_length + 1] = '\0';
/* reinsert '~' and ' ' in file names - 95/June/5 */
/* done late to prevent problems with null_terminate / space_terminate */
if (pseudo_tilde != 0 || pseudo_space != 0)
retwiddle(name_of_file + 1);
-#ifdef MSDOS
-/* 8 + 3 file names on Windows NT 95/Feb/20 */
if (shorten_file_name)
{
check_short_name(name_of_file + 1);
}
-#endif /* MSDOS */
if (open_trace_flag)
{
- sprintf(log_line, " Open `%s' for input ", name_of_file + 1); /* Pascal */
+ sprintf(log_line, " Open `%s' for input ", name_of_file + 1);
show_line(log_line, 0);
}
switch (path_index)
{
case TEXINPUTPATH:
- file_name = kpse_find_file((const_string)name_of_file + 1, kpse_tex_format, 0);
+ file_name = kpse_find_file((const_string) name_of_file + 1, kpse_tex_format, 0);
break;
case TEXFORMATPATH:
- file_name = kpse_find_file((const_string)name_of_file + 1, kpse_fmt_format, 0);
+ file_name = kpse_find_file((const_string) name_of_file + 1, kpse_fmt_format, 0);
break;
case TFMFILEPATH:
- file_name = kpse_find_file((const_string)name_of_file + 1, kpse_tfm_format, 0);
+ file_name = kpse_find_file((const_string) name_of_file + 1, kpse_tfm_format, 0);
break;
}
if (file_name != NULL)
{
- strcpy ((char *)name_of_file + 1, file_name);
+ strcpy ((char *) name_of_file + 1, file_name);
*f = xfopen((char *) file_name, fopen_mode);
#ifdef MSDOS
if (path_index == TFMFILEPATH)
{
tfm_temp = getc (*f);
- //ungetc(tfm_temp, *f);
}
-#ifdef MSDOS
if (strstr((char *) name_of_file + 1, ".fmt") != NULL)
{
if (format_file == NULL)
show_line(log_line, 0);
}
}
-#endif /* end of MSDOS */
+
openable = true;
}
retwiddle(name_of_file + 1);
}
-#ifdef MSDOS
/* 8 + 3 file names on Windows NT 95/Feb/20 */
if (shorten_file_name)
{
check_short_name(name_of_file + 1);
}
-#endif
-#ifdef MSDOS
if (prepend_path_if (name_of_file + 1, name_of_file + 1, ".dvi", (unsigned char *) dvi_directory) ||
prepend_path_if (name_of_file + 1, name_of_file + 1, ".log", (unsigned char *) log_directory) ||
prepend_path_if (name_of_file + 1, name_of_file + 1, ".aux", (unsigned char *) aux_directory) ||
show_line(log_line, 0);
}
}
-#endif
if (open_trace_flag)
{
/* Is the filename openable as given? */
-/* if share_flag is non-zero and we are opening for reading use fsopen */
/* but we can assume this is opening here for *output* */
*f = fopen((char *) name_of_file + 1, fopen_mode);
#endif
if (deslash)
unixify((char *) temp_name); /* deslashify 93/Dec/28 */
-/* If share_flag is non-zero and we are opening for reading use fsopen */
+
/* but we can assume this is opening here for *output* */
*f = fopen((char*)temp_name, fopen_mode);
/* If this succeeded, change name_of_file accordingly. */
*log_line = '\0';
else
{
-#ifdef MSDOS
- (void) _getcwd(log_line, sizeof(log_line));
-#else
(void) getcwd(log_line, sizeof(log_line));
-#endif
strcat(log_line, PATH_SEP_STRING);
}
*log_line = '\0';
else
{
-#ifdef MSDOS
- (void) _getcwd(log_line, sizeof(log_line));
-#else
(void) getcwd(log_line, sizeof(log_line));
-#endif
strcat(log_line, PATH_SEP_STRING);
}
*log_line = '\0';
else
{
-#ifdef MSDOS
- (void) _getcwd(log_line, sizeof(log_line));
-#else
(void) getcwd(log_line, sizeof(log_line));
-#endif
strcat(log_line, PATH_SEP_STRING);
}