diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-12 18:01:44 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2024-02-12 18:04:26 -0800 |
commit | 01484cf8029253e704482817ebcff6c0d7449672 (patch) | |
tree | ab8055347da45d70d76e318e58c767f6c5d2c205 | |
parent | c48217d6d977c15ef8bba9fc767a1997a1e91e99 (diff) |
unifdef SCO, __SCO__, and __UNIXWARE__
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | man.c | 8 | ||||
-rw-r--r-- | misc.c | 27 | ||||
-rw-r--r-- | vendor.c | 30 | ||||
-rw-r--r-- | vendor.h | 41 |
4 files changed, 13 insertions, 93 deletions
@@ -437,11 +437,7 @@ ReadCurrentSection(Manual * local_manual, char *path) */ if ((ptr = strrchr(path, '.')) != NULL) { -#if !defined(__SCO__) if (streq(ptr + 1, COMPRESSION_EXTENSION)) -#else - if (strpbrk(ptr + 1, COMPRESSION_EXTENSIONS) != NULL) -#endif *ptr = '\0'; #ifdef GZIP_EXTENSION else if (streq(ptr + 1, GZIP_EXTENSION)) @@ -483,11 +479,7 @@ ReadCurrentSection(Manual * local_manual, char *path) */ if ((ptr = strrchr(full_name, '.')) != NULL) { -#if !defined(__SCO__) if (streq(ptr + 1, COMPRESSION_EXTENSION)) -#else - if (strpbrk(ptr + 1, COMPRESSION_EXTENSIONS) != NULL) -#endif *ptr = '\0'; #ifdef GZIP_EXTENSION else if (streq(ptr + 1, GZIP_EXTENSION)) @@ -60,16 +60,6 @@ static Boolean ConstructCommand(char *cmdbuf, const char *path, const char *filename, const char *tempfile); #endif -#if defined(__SCO__) || defined(__UNIXWARE__) -static char *uncompress_format = NULL; - -static char *uncompress_formats[] = { - UNCOMPRESS_FORMAT_1, - UNCOMPRESS_FORMAT_2, - UNCOMPRESS_FORMAT_3 -}; -#endif - /* Function Name: PopupWarning * Description: This function pops up a warning message. * Arguments: string - the specific warning string. @@ -196,10 +186,6 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num) const char *entry = manual[section_num].entries[entry_num]; int len_cat = strlen(CAT); -#if defined(__SCO__) || defined(__UNIXWARE__) - int i; -#endif - temp = CreateManpageName(entry, 0, 0); snprintf(man_globals->manpage_title, sizeof(man_globals->manpage_title), "The current manual page is: %s.", temp); @@ -227,7 +213,6 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num) * Then for compressed files in an uncompressed directory. */ -#if !defined(__UNIXWARE__) #if defined(__OpenBSD__) || defined(__NetBSD__) /* look in machine subdir first */ snprintf(filename, sizeof(filename), "%s/%s%s/%s/%s.%s", path, CAT, @@ -277,18 +262,6 @@ FindManualFile(ManpageGlobals * man_globals, int section_num, int entry_num) return (file); } #endif -#else - for (i = 0; i < strlen(COMPRESSION_EXTENSIONS); i++) { - snprintf(filename, sizeof(filename), "%s/%s%s/%s.%c", path, CAT, - section + len_cat, page, COMPRESSION_EXTENSIONS[i]); - uncompress_format = uncompress_formats[i]; -#ifdef DEBUG - printf("Trying .%c ...\n", COMPRESSION_EXTENSIONS[i]); -#endif - if ((file = Uncompress(man_globals, filename)) != NULL) - return (file); - } -#endif /* * And lastly files in a compressed directory. @@ -53,36 +53,6 @@ static SectionNameRec SectionNames[] = { {"(l) Local", "l"}, {"(n) New", "n"}, {"(o) Old", "o"} -#ifdef __SCO__ - , - {"(ADM) System Administration", "ADM"}, - {"(ADMN) Network Administration", "ADMN"}, - {"(ADMP) Protocol Administration", "ADMP"}, - {"(C) Commands", "C"}, - {"(CMD) DOS Commands", "CMD"}, - {"(CP) Programming Commands", "CP"}, - {"(DOS) DOS Subroutines and Libraries", "DOS"}, - {"(F) File Formats", "F"}, - {"(HW) Hardware Dependent", "HW"}, - {"(K) Kernel Subroutines", "K"}, - {"(LOCAL) Local utilities for your system", "LOCAL"}, - {"(M) Miscellaneous", "M"}, - {"(NADM) NFS Administration", "NADM"}, - {"(NC) Network Commands", "NC"}, - {"(NF) Network File Formats", "NF"}, - {"(NS) Network Subroutines", "NS"}, - {"(NSL) Network Services", "NSL"}, - {"(S) Subroutines and Libraries", "S"}, - {"(SCO) Product Engineering Toolkit", "SCO"}, - {"(SFF) Socket File Formats", "SFF"}, - {"(STR) Streams", "STR"}, - {"(TC) Transport Layer Commands", "TC"}, - {"(X) X Man pages", "X"}, - {"(XNX) Xenix Subroutines, Commands and Libs", "XNX"}, - {"(XS) X11 Subroutines and Libraries", "XS"}, - {"(Xm) Motif Commands and Subroutines", "Xm"}, - {"(Xt) X Intrinsics", "Xt"} -#endif }; #else @@ -84,29 +84,18 @@ from the X Consortium. * Compression Definitions. */ -#if defined(__SCO__) || defined(__UNIXWARE__) -# define COMPRESSION_EXTENSION "Z" /* dummy */ -# define COMPRESSION_EXTENSIONS "zZF" /* pack, compress, freeze */ -# define UNCOMPRESS_FORMAT uncompress_format -# define UNCOMPRESS_FORMAT_1 "pcat %s > %s" -# define UNCOMPRESS_FORMAT_2 "zcat < %s > %s" -# define UNCOMPRESS_FORMAT_3 "fcat < %s > %s" -# define NO_COMPRESS -#else -# define COMPRESSION_EXTENSION "Z" -# define UNCOMPRESS_FORMAT "zcat < %s >> %s" -# define COMPRESS "compress" -# define GZIP_EXTENSION "gz" -# define GUNZIP_FORMAT "gzip -c -d < %s >> %s" -# define GZIP_COMPRESS "gzip" -# define BZIP2_EXTENSION "bz2" -# define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s" -# define BZIP2_COMPRESS "bzip2" -# define LZMA_EXTENSION "lzma" -# define UNLZMA_FORMAT "unlzma -c -d < %s >> %s" -# define LZMA_COMPRESS "lzma" -#endif - +#define COMPRESSION_EXTENSION "Z" +#define UNCOMPRESS_FORMAT "zcat < %s >> %s" +#define COMPRESS "compress" +#define GZIP_EXTENSION "gz" +#define GUNZIP_FORMAT "gzip -c -d < %s >> %s" +#define GZIP_COMPRESS "gzip" +#define BZIP2_EXTENSION "bz2" +#define BUNZIP2_FORMAT "bunzip2 -c -d < %s >> %s" +#define BZIP2_COMPRESS "bzip2" +#define LZMA_EXTENSION "lzma" +#define UNLZMA_FORMAT "unlzma -c -d < %s >> %s" +#define LZMA_COMPRESS "lzma" /* @@ -160,11 +149,7 @@ from the X Consortium. #define MAN "man" #endif -#if defined(SCO) -# define CAT "cat." -#else -# define CAT "cat" -#endif +#define CAT "cat" /* Solaris has nroff man pages in "man" and sgml man pages in "sman" */ #if defined(sun) && defined(SVR4) |