Drop OS/2 support

This commit is contained in:
Adam Jackson
2009-01-20 23:17:55 -05:00
parent 0cdc9b8f85
commit 6c29007756
10 changed files with 9 additions and 27 deletions

View File

@@ -217,14 +217,6 @@ _fs_add_rep_log (FSFpePtr conn, fsGenericReply *rep)
static Bool
fs_name_check(char *name)
{
#ifdef __UNIXOS2__
/* OS/2 uses D:/usr/X11R6/.... as fontfile pathnames, so check that
* there is not only a protocol/ prefix, but also that the first chars
* are not a drive letter
*/
if (name && isalpha(*name) && name[1] == ':')
return FALSE;
#endif
/* Just make sure there is a protocol/ prefix */
return (name && *name != '/' && strchr(name, '/'));
}

View File

@@ -64,9 +64,6 @@
#define EINTR WSAEINTR
#endif
#ifdef __UNIXOS2__
#define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t)
#endif
static int padlength[4] = {0, 3, 2, 1};

View File

@@ -64,7 +64,7 @@ from The Open Group.
# endif
#endif
#ifndef OPEN_MAX
#if defined(SVR4) || defined(__UNIXOS2__)
#if defined(SVR4)
#define OPEN_MAX 256
#else
#include <sys/param.h>

View File

@@ -125,7 +125,7 @@ BufFileRawClose (BufFilePtr f, int doClose)
BufFilePtr
BufFileOpenRead (int fd)
{
#if defined(__UNIXOS2__) || defined (WIN32)
#if defined (WIN32)
/* hv: I'd bet WIN32 has the same effect here */
setmode(fd,O_BINARY);
#endif
@@ -160,7 +160,7 @@ BufFileOpenWrite (int fd)
{
BufFilePtr f;
#if defined(__UNIXOS2__) || defined(WIN32)
#if defined(WIN32)
/* hv: I'd bet WIN32 has the same effect here */
setmode(fd,O_BINARY);
#endif

6
src/fontfile/dirfile.c Executable file → Normal file
View File

@@ -66,7 +66,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
status;
struct stat statb;
static char format[24] = "";
#if defined(__UNIXOS2__) || defined(WIN32)
#if defined(WIN32)
int i;
#endif
@@ -76,7 +76,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
return BadFontPath;
/* Check for font directory attributes */
#if !defined(__UNIXOS2__) && !defined(WIN32)
#if !defined(WIN32)
if ((ptr = strchr(directory, ':'))) {
#else
/* OS/2 and WIN32 path might start with a drive letter, don't clip this */
@@ -118,7 +118,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
MAXFONTFILENAMELEN-1, MAXFONTNAMELEN-1);
while ((count = fscanf(file, format, file_name, font_name)) != EOF) {
#if defined(__UNIXOS2__) || defined(WIN32)
#if defined(WIN32)
/* strip any existing trailing CR */
for (i=0; i<strlen(font_name); i++) {
if (font_name[i]=='\r') font_name[i] = '\0';

View File

@@ -57,12 +57,7 @@ FontFileOpen (const char *name)
return 0;
}
len = strlen (name);
#ifndef __UNIXOS2__
if (len > 2 && !strcmp (name + len - 2, ".Z")) {
#else
if (len > 2 && (!strcmp (name + len - 4, ".pcz") ||
!strcmp (name + len - 2, ".Z"))) {
#endif
cooked = BufFilePushCompressed (raw);
if (!cooked) {
BufFileClose (raw, TRUE);

View File

@@ -42,7 +42,7 @@ FontFileOpenWrite (const char *name)
{
int fd;
#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__)
#if defined(WIN32) || defined(__CYGWIN__)
fd = open (name, O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0666);
#else
fd = creat (name, 0666);

View File

@@ -118,7 +118,7 @@ FontFileMakeDir(char *dirName, int size)
char *attrib;
int attriblen;
#if !defined(__UNIXOS2__) && !defined(WIN32)
#if !defined(WIN32)
attrib = strchr(dirName, ':');
#else
/* OS/2 uses the colon in the drive letter descriptor, skip this */

View File

@@ -55,7 +55,7 @@ int
FontFileNameCheck (char *name)
{
#ifndef NCD
#if defined(__UNIXOS2__) || defined(WIN32)
#if defined(WIN32)
/* OS/2 uses D:/... as a path name for fonts, so accept this as a valid
* path if it starts with a letter and a colon. Same applies for WIN32
*/

View File

@@ -202,7 +202,6 @@ xlfd_round_double(double x)
defined(__hppa__) || \
defined(__amd64__) || defined(__amd64) || \
defined(sgi)
#if !defined(__UNIXOS2__)
#include <float.h>
/* if we have IEEE 754 fp, we can round to binary digits... */
@@ -263,7 +262,6 @@ xlfd_round_double(double x)
}
else
#endif
#endif /* !__UNIXOS2__ */
#endif /* i386 || __i386__ */
{
/*