mirror of
https://github.com/SwallowOS/xorg_lib_libxfont
synced 2025-12-27 12:51:05 +08:00
Drop OS/2 support
This commit is contained in:
@@ -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, '/'));
|
||||
}
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
6
src/fontfile/dirfile.c
Executable file → Normal 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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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__ */
|
||||
{
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user