forked from KolibriOS/kolibrios
base unicode version
git-svn-id: svn://kolibrios.org@6764 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a64d63f213
commit
f3754c9c3b
@ -20,6 +20,8 @@ SDK_DIR:= $(abspath ../../../contrib/sdk)
|
|||||||
NOASM=1
|
NOASM=1
|
||||||
CC_CPU_OPT=-march=pentium
|
CC_CPU_OPT=-march=pentium
|
||||||
#USEZLIB=1
|
#USEZLIB=1
|
||||||
|
#DEBUG=1
|
||||||
|
|
||||||
|
|
||||||
### Optional section
|
### Optional section
|
||||||
|
|
||||||
@ -127,9 +129,9 @@ AS_WARN_OPT = $(CC_WARN_OPT)
|
|||||||
LD_WARN_OPT =
|
LD_WARN_OPT =
|
||||||
|
|
||||||
# Debug version
|
# Debug version
|
||||||
CC_DEBUG_OPT = -g
|
CC_DEBUG_OPT = -g -DDEBUG
|
||||||
AS_DEBUG_OPT = $(CC_DEBUG_OPT)
|
AS_DEBUG_OPT = $(CC_DEBUG_OPT)
|
||||||
LD_DEBUG_OPT = $(CC_DEBUG_OPT)
|
LD_DEBUG_OPT = -g
|
||||||
|
|
||||||
# Release version
|
# Release version
|
||||||
CC_RELEASE_OPT =
|
CC_RELEASE_OPT =
|
||||||
|
@ -103,7 +103,7 @@ INCLUDES= -I $(SDK_DIR)/sources/newlib/libc/include -I $(SDK_DIR)/sources/zlib
|
|||||||
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
LIBPATH = -L $(SDK_DIR)/lib -L /home/autobuild/tools/win32/mingw32/lib
|
||||||
|
|
||||||
CC_ENVIR_OPT = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DKOS32 \
|
CC_ENVIR_OPT = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DKOS32 \
|
||||||
$(INCLUDES) -DSTATIC_LIBC
|
$(INCLUDES) -DSTATIC_LIBC -DBUILD_LIBC
|
||||||
|
|
||||||
### Compiler-specific section
|
### Compiler-specific section
|
||||||
|
|
||||||
|
@ -13,9 +13,6 @@ Started by Siemargl @Nov 2016
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
|
||||||
// moved to makefile, in kilibri leads to bug EMFILES
|
|
||||||
//#define DEBUG
|
|
||||||
|
|
||||||
#define DIR_END '/'
|
#define DIR_END '/'
|
||||||
#define NO_STRNICMP
|
#define NO_STRNICMP
|
||||||
#define STRNICMP zstrnicmp
|
#define STRNICMP zstrnicmp
|
||||||
@ -27,6 +24,9 @@ Started by Siemargl @Nov 2016
|
|||||||
#define getch() getchar() /* not correct, but may not be on a console */
|
#define getch() getchar() /* not correct, but may not be on a console */
|
||||||
#define HAVE_WORKING_GETCH
|
#define HAVE_WORKING_GETCH
|
||||||
|
|
||||||
|
#define UNICODE_SUPPORT
|
||||||
|
#define UTF8_MAYBE_NATIVE
|
||||||
|
#define NO_NL_LANGINFO
|
||||||
/*
|
/*
|
||||||
# ifdef DATE_FORMAT
|
# ifdef DATE_FORMAT
|
||||||
# undef DATE_FORMAT
|
# undef DATE_FORMAT
|
||||||
|
@ -154,6 +154,8 @@ int mapname(__G__ renamed)
|
|||||||
else
|
else
|
||||||
++cp; /* point to start of last component of path */
|
++cp; /* point to start of last component of path */
|
||||||
|
|
||||||
|
fprintf(stderr, "mapname start[%s]\n", cp);
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------
|
/*---------------------------------------------------------------------------
|
||||||
Begin main loop through characters in filename.
|
Begin main loop through characters in filename.
|
||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
@ -180,7 +182,7 @@ int mapname(__G__ renamed)
|
|||||||
lastsemi = (char *)NULL; /* leave direct. semi-colons alone */
|
lastsemi = (char *)NULL; /* leave direct. semi-colons alone */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef __CYGWIN__ /* Cygwin runs on Win32, apply FAT/NTFS filename rules */
|
#ifdef KOS32 /* Cygwin runs on Win32, apply FAT/NTFS filename rules */
|
||||||
case ':': /* drive spec not stored, so no colon allowed */
|
case ':': /* drive spec not stored, so no colon allowed */
|
||||||
case '\\': /* '\\' may come as normal filename char (not */
|
case '\\': /* '\\' may come as normal filename char (not */
|
||||||
case '<': /* dir sep char!) from unix-like file system */
|
case '<': /* dir sep char!) from unix-like file system */
|
||||||
@ -205,7 +207,7 @@ int mapname(__G__ renamed)
|
|||||||
break; /* later, if requested */
|
break; /* later, if requested */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MTS
|
#ifdef KOS32
|
||||||
case ' ': /* change spaces to underscore under */
|
case ' ': /* change spaces to underscore under */
|
||||||
*pp++ = '_'; /* MTS; leave as spaces under Unix */
|
*pp++ = '_'; /* MTS; leave as spaces under Unix */
|
||||||
break;
|
break;
|
||||||
@ -217,11 +219,6 @@ int mapname(__G__ renamed)
|
|||||||
*/
|
*/
|
||||||
if ((isprint(workch) || (128 <= workch && workch <= 254)))
|
if ((isprint(workch) || (128 <= workch && workch <= 254)))
|
||||||
*pp++ = (char)workch;
|
*pp++ = (char)workch;
|
||||||
/*kos
|
|
||||||
if (uO.cflxflag ||
|
|
||||||
(isprint(workch) || (128 <= workch && workch <= 254)))
|
|
||||||
*pp++ = (char)workch;
|
|
||||||
*/
|
|
||||||
} /* end switch */
|
} /* end switch */
|
||||||
|
|
||||||
} /* end while loop */
|
} /* end while loop */
|
||||||
@ -326,6 +323,9 @@ int mapname(__G__ renamed)
|
|||||||
checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */
|
checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */
|
||||||
checkdir(__G__ G.filename, GETPATH);
|
checkdir(__G__ G.filename, GETPATH);
|
||||||
|
|
||||||
|
fprintf(stderr, "mapname end[%s]\n", pathcomp);
|
||||||
|
|
||||||
|
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
} /* end function mapname() */
|
} /* end function mapname() */
|
||||||
@ -467,6 +467,12 @@ int checkdir(__G__ pathcomp, flag)
|
|||||||
---------------------------------------------------------------------------*/
|
---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
if (FUNCTION == GETPATH) {
|
if (FUNCTION == GETPATH) {
|
||||||
|
if(G.native_is_utf8)
|
||||||
|
{
|
||||||
|
pathcomp[0] = 3; // kolibri utf8 flag
|
||||||
|
strcpy(pathcomp + 1, G.buildpath);
|
||||||
|
}
|
||||||
|
else
|
||||||
strcpy(pathcomp, G.buildpath);
|
strcpy(pathcomp, G.buildpath);
|
||||||
Trace((stderr, "getting and freeing path [%s]\n",
|
Trace((stderr, "getting and freeing path [%s]\n",
|
||||||
FnFilter1(pathcomp)));
|
FnFilter1(pathcomp)));
|
||||||
|
@ -790,6 +790,10 @@ int unzip(__G__ argc, argv)
|
|||||||
* UnZip maintainer, a successful switch to "en-US.UTF-8"
|
* UnZip maintainer, a successful switch to "en-US.UTF-8"
|
||||||
* resulted in garbage display of all non-basic ASCII characters.
|
* resulted in garbage display of all non-basic ASCII characters.
|
||||||
*/
|
*/
|
||||||
|
#ifdef KOS32
|
||||||
|
/* manual override */
|
||||||
|
G.native_is_utf8 = TRUE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
# endif /* UTF8_MAYBE_NATIVE */
|
# endif /* UTF8_MAYBE_NATIVE */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user