summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-15 15:06:52 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-11-15 15:06:52 +0000
commit59e48918e7c252926bb5e51a077bcbc8a7eec829 (patch)
treef5801b920fd8457d1c3e50576f0106290c66e4cb
parent0336e043fab6f2a8828d90bc9eef2e23878f6dd1 (diff)
downloadxorg-app-xkbcomp-sco_port_update.tar.gz
mingw (Win32) port
-rw-r--r--listing.c10
-rw-r--r--xkbcomp.c25
2 files changed, 30 insertions, 5 deletions
diff --git a/listing.c b/listing.c
index d3a359c..cc887b8 100644
--- a/listing.c
+++ b/listing.c
@@ -112,10 +112,10 @@ SOFTWARE.
#endif
#ifdef WIN32
-#define BOOL wBOOL
#include <windows.h>
-#undef BOOL
#define FileName(file) file.cFileName
+#undef TEXT
+#undef ALTERNATE
#else
#define FileName(file) file->d_name
#ifndef X_NOT_POSIX
@@ -275,7 +275,7 @@ AddDirectory(char *head,char *ptrn,char *rest,char *map)
if (map!=NULL) {
tmp= strchr(tmp,')');
if ((tmp==NULL)||(tmp[1]!='\0')) {
- ERROR("File and map must have the format file(map)\n");
+ ERROR1("File and map must have the format file(map)\n");
return 0;
}
*map= '\0'; map++;
@@ -365,7 +365,7 @@ char *str,*head,*ptrn,*rest= NULL;
}
if(((rest && ptrn)&&((strchr(ptrn,'(')!=NULL)||(strchr(ptrn,')')!=NULL)))||
(head && ((strchr(head,'(')!=NULL)||(strchr(head,')')!=NULL)))) {
- ERROR("Files/maps to list must have the form file(map)\n");
+ ERROR1("Files/maps to list must have the form file(map)\n");
ACTION("Illegal specifier ignored\n");
return 0;
}
@@ -400,7 +400,7 @@ unsigned oldWarningLevel;
char * mapName;
if (nFilesListed<1) {
- ERROR("Must specify at least one file or pattern to list\n");
+ ERROR1("Must specify at least one file or pattern to list\n");
return 0;
}
if ((!out_name)||((out_name[0]=='-')&&(out_name[1]=='\0')))
diff --git a/xkbcomp.c b/xkbcomp.c
index 962fa61..f54f4f0 100644
--- a/xkbcomp.c
+++ b/xkbcomp.c
@@ -54,6 +54,13 @@
#define chdir _chdir2
#endif
+#ifdef WIN32
+#define S_IRGRP 0
+#define S_IWGRP 0
+#define S_IROTH 0
+#define S_IWOTH 0
+#endif
+
#define lowbit(x) ((x) & (-(x)))
/***====================================================================***/
@@ -487,7 +494,14 @@ register int i,tmp;
else if (uStringEqual(inputFile,"-")) {
inputFormat= INPUT_XKB;
}
+#ifndef WIN32
else if (strchr(inputFile,':')==0) {
+#else
+ else if ((strchr(inputFile,':')==0) || (
+ strlen(inputFile) > 2 &&
+ isalpha(inputFile[0]) &&
+ inputFile[1] == ':' && strchr(inputFile + 2,':')==NULL)) {
+#endif
int len;
len= strlen(inputFile);
if (inputFile[len-1]==')') {
@@ -611,6 +625,12 @@ register int i,tmp;
*ch++= '.';
strcpy(ch,fileTypeExt[outputFormat]);
}
+#ifdef WIN32
+ else if (strlen(outputFile) > 2 &&
+ isalpha(outputFile[0]) &&
+ outputFile[1] == ':' && strchr(outputFile + 2,':')==NULL) {
+ }
+#endif
else if (strchr(outputFile,':')!=NULL) {
outDpyName= outputFile;
outputFile= NULL;
@@ -899,7 +919,12 @@ Status status;
ACTION("Exiting\n");
exit(1);
}
+#ifndef WIN32
out= fdopen(outputFileFd, openMode);
+#else
+ close(outputFileFd);
+ out= fopen(outputFile, "wb");
+#endif
/* end BR */
if (out==NULL) {
ERROR1("Cannot open \"%s\" to write keyboard description\n",