home *** CD-ROM | disk | FTP | other *** search
- diff -C 4 mc/orig/mc.c mc/mc.c
- *** mc/orig/mc.c Sat Jan 14 18:34:46 1995
- --- mc/mc.c Sun Jan 15 02:48:38 1995
- ***************
- *** 28,35 ****
- --- 28,39 ----
- char ebuf[MAXSTRLEN+5], *muttfile = "", *include_list[10];
- FILE *lstfile = NULL, *srcfile;
- int errors = 0, warnings = 0, srcline = 0;
-
- + #if OS2
- + #define optarg Optarg
- + #endif
- +
- main(argc,argv) char *argv[];
- {
- extern char *optarg, optltr; /* in argh.c */
- extern int no_warn, no_gripe; /* in supp.c */
- diff -C 4 me/orig/config.h me/config.h
- *** me/orig/config.h Sat Jan 14 18:36:02 1995
- --- me/config.h Sat Jan 21 16:46:24 1995
- ***************
- *** 62,70 ****
- #define USE_DEFAULT_MUTT_SEARCH_PATH 1
- #define DEFAULT_MUTT_SEARCH_PATH "/usr/local/me3:/usr/contrib/me3"
- #endif /* UX_OS */
-
- ! #if MSDOZ /* MS-DOS */
- #define USE_DEFAULT_MUTT_SEARCH_PATH 1
- #define DEFAULT_MUTT_SEARCH_PATH "C:/me3"
- #endif /* MSDOZ */
-
- --- 62,70 ----
- #define USE_DEFAULT_MUTT_SEARCH_PATH 1
- #define DEFAULT_MUTT_SEARCH_PATH "/usr/local/me3:/usr/contrib/me3"
- #endif /* UX_OS */
-
- ! #if MSDOZ || OS2 /* MS-DOS or OS/2 */
- #define USE_DEFAULT_MUTT_SEARCH_PATH 1
- #define DEFAULT_MUTT_SEARCH_PATH "C:/me3"
- #endif /* MSDOZ */
-
- diff -C 4 me/orig/help.c me/help.c
- *** me/orig/help.c Sat Jan 14 18:35:38 1995
- --- me/help.c Sun Jan 15 01:08:48 1995
- ***************
- *** 399,406 ****
- --- 399,409 ----
- static char *extensions_to_ignore[] =
- #if UX_OS
- { ".o", ".mco", NULL };
- #endif
- + #if OS2
- + { ".o", ".obj", ".exe", ".com", ".dll", ".dvi", ".mco", NULL };
- + #endif
- #if MSDOZ
- { ".OBJ", ".MCO", NULL };
- #endif
- #if ATARI
- ***************
- *** 432,439 ****
- --- 435,445 ----
- while (n--)
- {
- #if MSDOZ
- lowercase(ptr);
- + #endif
- + #if OS2
- + _fnlwr(ptr);
- #endif
- *qtr++ = ptr;
- while (*ptr++) ;
- }
- diff -C 4 me/orig/main.c me/main.c
- *** me/orig/main.c Sat Jan 14 18:35:42 1995
- --- me/main.c Sun Jan 15 01:34:50 1995
- ***************
- *** 82,93 ****
- * Every time anything is done, the display probably needs updating.
- * Every time a Mutt program is run, the current buffer could get
- * outta sync with the current window.
- */
- ! main(argc,argv) int argc; char *argv[];
- {
- int n;
- register EKeyCode kc;
-
- /* Get everything ready to go */
- zargc = argc; zargv = argv;
- edinit(SCRATCH_BUFFER);
- --- 82,98 ----
- * Every time anything is done, the display probably needs updating.
- * Every time a Mutt program is run, the current buffer could get
- * outta sync with the current window.
- */
- ! main(argc,argv) int argc; char **argv;
- {
- int n;
- register EKeyCode kc;
- +
- + #if OS2
- + /* do wildcard expansion, since the shell won't */
- + _wildcard(&argc, &argv);
- + #endif
-
- /* Get everything ready to go */
- zargc = argc; zargv = argv;
- edinit(SCRATCH_BUFFER);
- diff -C 4 me/orig/os.c me/os.c
- *** me/orig/os.c Sat Jan 14 18:35:52 1995
- --- me/os.c Sun Jan 15 01:40:14 1995
- ***************
- *** 285,293 ****
-
- /* ******************************************************************** */
- /* **************************** atariST Stuff ************************* */
- /* ******************************************************************** */
- ! #if ATARI
-
- #define PSEP ';' /* search path separater */
-
- /* !!!Having a fixed size array is asking for trouble. Especially on
- --- 285,293 ----
-
- /* ******************************************************************** */
- /* **************************** atariST Stuff ************************* */
- /* ******************************************************************** */
- ! #if ATARI || OS2
-
- #define PSEP ';' /* search path separater */
-
- /* !!!Having a fixed size array is asking for trouble. Especially on
- ***************
- *** 302,310 ****
- static char msp[NFILEN]; /* Filled with '\0' !!!asking for trouble */
-
- char *ptr;
-
- ! que_version_info("OS", "Atari", "", (char *)NULL);
-
- canonize(".", current_dir, (char *)NULL);
-
- mutt_search_path = getenv(MUTT_ENV_VAR);
- --- 302,316 ----
- static char msp[NFILEN]; /* Filled with '\0' !!!asking for trouble */
-
- char *ptr;
-
- ! que_version_info("OS",
- ! #if ATARI
- ! "Atari", "",
- ! #elif OS2
- ! "OS/2", "2", "0+",
- ! #endif
- ! (char *)NULL);
-
- canonize(".", current_dir, (char *)NULL);
-
- mutt_search_path = getenv(MUTT_ENV_VAR);
- ***************
- *** 329,336 ****
- --- 335,347 ----
- {
- return current_dir;
- }
-
- + #if OS2
- + /* change drive and directory */
- + # define chdir _chdir2
- + #endif
- +
- /* Notes:
- * Same as Unix change_directory()
- */
- change_directory(directory) char *directory;
- ***************
- *** 356,364 ****
- /* ******************************************************************** */
- /* ************** Unix, MS-DOS and atariST Stuff ********************** */
- /* ******************************************************************** */
-
- ! #if UX_OS || MSDOZ || ATARI
-
- /* find_file: Look around the file system for a file.
- * Input:
- * name: Name of the file to look for. May have a leading path.
- --- 367,375 ----
- /* ******************************************************************** */
- /* ************** Unix, MS-DOS and atariST Stuff ********************** */
- /* ******************************************************************** */
-
- ! #if UX_OS || MSDOZ || ATARI || OS2
-
- /* find_file: Look around the file system for a file.
- * Input:
- * name: Name of the file to look for. May have a leading path.
- ***************
- *** 383,391 ****
- char buf[NFILEN +80], *ptr, *qtr;
- int n;
-
- if (strchr(name,U_SLASH)
- ! #if MSDOZ || ATARI /* MS-DOS "A:foo" */
- || strchr(name,M_SLASH) || name[1] == ':'
- #endif
- )
- {
- --- 394,402 ----
- char buf[NFILEN +80], *ptr, *qtr;
- int n;
-
- if (strchr(name,U_SLASH)
- ! #if MSDOZ || ATARI || OS2 /* MS-DOS "A:foo" */
- || strchr(name,M_SLASH) || name[1] == ':'
- #endif
- )
- {
- ***************
- *** 415,423 ****
- /* ******************************************************************** */
- /* ********************** Unix and atariST Stuff ********************** */
- /* ******************************************************************** */
-
- ! #if UX_OS || ATARI
-
- /* Return the current time and date.
- * If you can't do this, return zeros and FALSE.
- * Data formats:
- --- 426,434 ----
- /* ******************************************************************** */
- /* ********************** Unix and atariST Stuff ********************** */
- /* ******************************************************************** */
-
- ! #if UX_OS || ATARI || OS2
-
- /* Return the current time and date.
- * If you can't do this, return zeros and FALSE.
- * Data formats:
- diff -C 4 me/orig/spawn.c me/spawn.c
- *** me/orig/spawn.c Sat Jan 14 18:35:56 1995
- --- me/spawn.c Sat Jan 21 13:51:22 1995
- ***************
- *** 85,93 ****
- #endif /* UX_OS */
-
-
-
- ! #if ATARI
- register char *ptr;
-
- if (dont_spawn) return FALSE;
-
- --- 85,93 ----
- #endif /* UX_OS */
-
-
-
- ! #if ATARI || OS2
- register char *ptr;
-
- if (dont_spawn) return FALSE;
-
- ***************
- *** 98,105 ****
- --- 98,108 ----
- {
- close_display(TRUE); /* restore terminal for normal user interface */
- if ((ptr = getenv("SHELL")) != NULL && *ptr != '\0')
- system(ptr); /* system("/bin/ksh"); */
- + #if OS2
- + else system("cmd.exe"); /* default shell */
- + #endif
- open_display(); /* set up terminal for editor */
- }
- return TRUE;
- #endif /* ATARI */
- ***************
- *** 133,141 ****
-
- if (ask) /* restore terminal for normal user interface */
- close_display(FALSE);
-
- ! #if UX_OS || MSDOZ || ATARI
- if (ask) t_putchar('\n'); /* so the cmd doesn't overwrite the minibuffer */
- s = system(command); /* !!!??? returns -1 or command return code */
- #endif /* UX_OS || MSDOZ || ATARI */
-
- --- 136,144 ----
-
- if (ask) /* restore terminal for normal user interface */
- close_display(FALSE);
-
- ! #if UX_OS || MSDOZ || ATARI || OS2
- if (ask) t_putchar('\n'); /* so the cmd doesn't overwrite the minibuffer */
- s = system(command); /* !!!??? returns -1 or command return code */
- #endif /* UX_OS || MSDOZ || ATARI */
-
- ***************
- *** 250,255 ****
- --- 253,261 ----
- if (in_bag) unlink(fin);
- else open_display();
- #endif
-
- + #if OS2
- + ttopen(); /* reset the keyboard -- I was losing ^S and ^C */
- + #endif
- return s;
- }
- diff -C 4 util/orig/argh.c util/argh.c
- *** util/orig/argh.c Sat Jan 14 18:35:10 1995
- --- util/argh.c Sat Jan 21 14:22:00 1995
- ***************
- *** 16,23 ****
- --- 16,30 ----
- #include <stdio.h>
- #include <ctype.h>
- #include "const.h"
-
- + #if __EMX__ /* don't include os.h, so OS2 isn't defined */
- + /* the emx getopt code is being linked in for some reason, and this
- + * conflicts
- + */
- + #define optarg Optarg
- + #endif
- +
- /* the next 3 vars are to be used by the calling pgm */
- char *optarg, /* pointer to word */
- optltr; /* option letter */
- int opterr = TRUE; /* tell errors? */
- diff -C 4 util/orig/canonize.c util/canonize.c
- *** util/orig/canonize.c Sat Jan 14 18:35:16 1995
- --- util/canonize.c Tue Jan 17 00:39:50 1995
- ***************
- *** 115,128 ****
-
- /* Ensure file name is not empty ie contains at least "c\0" */
- if (*fnptr == '\0') return NULL;
-
- ! #if MSDOZ
- if (fnptr[1] == ':') /* if drive provided, use it */
- { *cnptr++ = toupper(*fnptr); fnptr += 2; }
- else *cnptr++ = 'A' + GET_DRIVE(); /* drive missing: use current drive */
- *cnptr++ = ':';
- ! #endif /* MSDOZ */
-
- first_slash = cnptr; /* point to opening slash */
- if (ISSLASH(*fnptr))
- {
- --- 115,132 ----
-
- /* Ensure file name is not empty ie contains at least "c\0" */
- if (*fnptr == '\0') return NULL;
-
- ! #if MSDOZ || OS2
- if (fnptr[1] == ':') /* if drive provided, use it */
- { *cnptr++ = toupper(*fnptr); fnptr += 2; }
- + #if MSDOZ
- else *cnptr++ = 'A' + GET_DRIVE(); /* drive missing: use current drive */
- + #else
- + else *cnptr++ = _getdrive();
- + #endif
- *cnptr++ = ':';
- ! #endif /* MSDOZ || OS2 */
-
- first_slash = cnptr; /* point to opening slash */
- if (ISSLASH(*fnptr))
- {
- ***************
- *** 147,154 ****
- --- 151,170 ----
- for (; *cnptr; cnptr++) if (*cnptr == M_SLASH) *cnptr = U_SLASH;
- *cnptr++ = U_SLASH;
- }
- #else
- + #if OS2
- + if (current_directory && *current_directory == *cname) /* better be canonized */
- + strcpy(cname,current_directory);
- + else if (_getcwd1(cnptr,cname[0]) == -1) return NULL; /* at least a "/" */
- + while (*cnptr) { /* move to end of current directory */
- + if (ISSLASH(*cnptr))
- + *cnptr = U_SLASH; /* _getcwd1 is supposed to do this ... */
- + cnptr++;
- + }
- +
- + if (cnptr[-1] != U_SLASH) *cnptr++ = U_SLASH; /* in case cd is "/" */
- + #else
-
- #if UX_OS
- if (current_directory) /* better be canonized */
- strcpy(cnptr,current_directory);
- ***************
- *** 170,177 ****
- --- 186,194 ----
- /* Nothing defined, nuke the compile */
- Need_to_define = Something;
- #endif /* ATARI */
- #endif /* UX_OS */
- + #endif /* OS2 */
- #endif /* MSDOZ */
- }
-
- while (TRUE)
- ***************
- *** 190,197 ****
- --- 207,219 ----
-
- #if MSDOZ
- lowercase(first_slash); /* lowercase all but drive */
- #endif /* MSDOZ */
- +
- + #if OS2
- + _fnlwr(cname); /* lowercase on all-uppercase drives */
- + #endif
- +
- return cname;
- }
-
- /* know: cnptr[-1] == slash */
- diff -C 4 util/orig/fname.c util/fname.c
- *** util/orig/fname.c Sat Jan 14 18:35:12 1995
- --- util/fname.c Sun Jan 15 00:35:22 1995
- ***************
- *** 36,49 ****
- ptr--;
- if (ISSLASH(*ptr))
- {
- if (ptr == fname) ptr++; /* /, /foo */
- ! #if MSDOZ || ATARI
- else if (ptr[-1] == DRIVE) ptr++; /* A:/, A:/foo */
- #endif
- break;
- }
- ! #if MSDOZ || ATARI
- if (*ptr == DRIVE) { ptr++; break; } /* A:, A:foo */
- #endif
- }
- if (*ptr == DOT) /* might have . or .. */
- --- 36,49 ----
- ptr--;
- if (ISSLASH(*ptr))
- {
- if (ptr == fname) ptr++; /* /, /foo */
- ! #if MSDOZ || ATARI || OS2
- else if (ptr[-1] == DRIVE) ptr++; /* A:/, A:/foo */
- #endif
- break;
- }
- ! #if MSDOZ || ATARI || OS2
- if (*ptr == DRIVE) { ptr++; break; } /* A:, A:foo */
- #endif
- }
- if (*ptr == DOT) /* might have . or .. */
- diff -C 4 util/orig/fxpand.c util/fxpand.c
- *** util/orig/fxpand.c Sat Jan 14 18:35:16 1995
- --- util/fxpand.c Sat Jan 21 13:23:00 1995
- ***************
- *** 127,135 ****
-
- fxpand(name, onlyone,nopath,slash_dir, name_heap,process_fname)
- char *name,*name_heap; pfi process_fname;
- {
- ! char path[128], word[100], *ptr, *qtr, tbuf[128];
- File_Info de;
- int atend, eval, found, needadot, path_len, s;
-
- if (name_heap) /* store the found file names in name_heap */
- --- 127,135 ----
-
- fxpand(name, onlyone,nopath,slash_dir, name_heap,process_fname)
- char *name,*name_heap; pfi process_fname;
- {
- ! char path[_MAX_PATH], word[100], *ptr, *qtr, tbuf[_MAX_PATH];
- File_Info de;
- int atend, eval, found, needadot, path_len, s;
-
- if (name_heap) /* store the found file names in name_heap */
- ***************
- *** 236,243 ****
- --- 236,249 ----
- #define GOTTA_EVAL case '?': case '[': case '*'
-
- #endif /* MSDOZ */
-
- +
- + /* emx provides unix-like directory routines. It can use dirent or direct */
- + #if OS2
- + #undef ATARI
- + #define ATARI 1 /* the atari code does what we want with slashes */
- + #endif
-
- #if ATARI /* Atari has Posix opendir(), etc */
- #undef POSIX_OS
- #define POSIX_OS 1 /* turn on POSIX and UX_OS */
- diff -C 4 util/orig/os.h util/os.h
- *** util/orig/os.h Sat Jan 14 18:35:08 1995
- --- util/os.h Sat Jan 21 13:27:00 1995
- ***************
- *** 23,35 ****
- #endif
-
- #define ATARI 0 /* AtariST/TT TOS or MiNT */
-
- !
- ! #define OS2 0 /* OS/2 */
- ! #if OS2
- ! #undef MSDOZ
- ! #define MSDOZ 1
- #endif
-
- #define AMIGA 0 /* AmigaDOS !NOT SUPPORTED! */
-
- --- 23,37 ----
- #endif
-
- #define ATARI 0 /* AtariST/TT TOS or MiNT */
-
- ! #ifdef __EMX__ /* emx/gcc compiler for OS/2 (and sometimes DOS) */
- ! #define OS2 1 /* OS/2 */
- ! /* this is different enough from MSDOZ that I don't define MSDOZ.
- ! * It's actually similar to ATARI.
- ! */
- ! #else
- ! #define OS2 0
- #endif
-
- #define AMIGA 0 /* AmigaDOS !NOT SUPPORTED! */
-
- ***************
- *** 98,106 ****
-
- #define M_SLASH '\\' /* file seperator for MS-DOS */
- #define U_SLASH '/' /* file seperator for UN*X */
-
- ! #if MSDOZ || ATARI
- #define ISSLASH(c) ((c) == U_SLASH || (c) == M_SLASH)
- #else
- #define ISSLASH(c) ((c) == U_SLASH)
- #endif /* MSDOZ || ATARI */
- --- 100,108 ----
-
- #define M_SLASH '\\' /* file seperator for MS-DOS */
- #define U_SLASH '/' /* file seperator for UN*X */
-
- ! #if MSDOZ || ATARI || OS2
- #define ISSLASH(c) ((c) == U_SLASH || (c) == M_SLASH)
- #else
- #define ISSLASH(c) ((c) == U_SLASH)
- #endif /* MSDOZ || ATARI */
- diff -C 4 util/orig/wildmat.c util/wildmat.c
- *** util/orig/wildmat.c Sat Jan 14 18:35:08 1995
- --- util/wildmat.c Sun Jan 15 00:33:42 1995
- ***************
- *** 61,69 ****
- for ( ; *p; text++, p++) {
- if (*text == '\0' && *p != '*')
- return ABORT;
- switch (*p) {
- ! #if !(MSDOZ || ATARI) /* blame those bozos at Microsoft */
- case '\\':
- /* Literal match with following character. */
- p++;
- /* FALLTHROUGH */
- --- 61,69 ----
- for ( ; *p; text++, p++) {
- if (*text == '\0' && *p != '*')
- return ABORT;
- switch (*p) {
- ! #if !(MSDOZ || ATARI || OS2) /* blame those bozos at Microsoft */
- case '\\':
- /* Literal match with following character. */
- p++;
- /* FALLTHROUGH */
-