mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 23:56:49 +03:00
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
|
||||
CC_CPU_OPT=-march=pentium
|
||||
#USEZLIB=1
|
||||
#DEBUG=1
|
||||
|
||||
|
||||
### Optional section
|
||||
|
||||
@ -127,9 +129,9 @@ AS_WARN_OPT = $(CC_WARN_OPT)
|
||||
LD_WARN_OPT =
|
||||
|
||||
# Debug version
|
||||
CC_DEBUG_OPT = -g
|
||||
CC_DEBUG_OPT = -g -DDEBUG
|
||||
AS_DEBUG_OPT = $(CC_DEBUG_OPT)
|
||||
LD_DEBUG_OPT = $(CC_DEBUG_OPT)
|
||||
LD_DEBUG_OPT = -g
|
||||
|
||||
# Release version
|
||||
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
|
||||
|
||||
CC_ENVIR_OPT = -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -DKOS32 \
|
||||
$(INCLUDES) -DSTATIC_LIBC
|
||||
$(INCLUDES) -DSTATIC_LIBC -DBUILD_LIBC
|
||||
|
||||
### Compiler-specific section
|
||||
|
||||
|
@ -13,9 +13,6 @@ Started by Siemargl @Nov 2016
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
|
||||
// moved to makefile, in kilibri leads to bug EMFILES
|
||||
//#define DEBUG
|
||||
|
||||
#define DIR_END '/'
|
||||
#define NO_STRNICMP
|
||||
#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 HAVE_WORKING_GETCH
|
||||
|
||||
#define UNICODE_SUPPORT
|
||||
#define UTF8_MAYBE_NATIVE
|
||||
#define NO_NL_LANGINFO
|
||||
/*
|
||||
# ifdef DATE_FORMAT
|
||||
# undef DATE_FORMAT
|
||||
|
@ -154,6 +154,8 @@ int mapname(__G__ renamed)
|
||||
else
|
||||
++cp; /* point to start of last component of path */
|
||||
|
||||
fprintf(stderr, "mapname start[%s]\n", cp);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Begin main loop through characters in filename.
|
||||
---------------------------------------------------------------------------*/
|
||||
@ -180,7 +182,7 @@ int mapname(__G__ renamed)
|
||||
lastsemi = (char *)NULL; /* leave direct. semi-colons alone */
|
||||
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 '\\': /* '\\' may come as normal filename char (not */
|
||||
case '<': /* dir sep char!) from unix-like file system */
|
||||
@ -205,7 +207,7 @@ int mapname(__G__ renamed)
|
||||
break; /* later, if requested */
|
||||
#endif
|
||||
|
||||
#ifdef MTS
|
||||
#ifdef KOS32
|
||||
case ' ': /* change spaces to underscore under */
|
||||
*pp++ = '_'; /* MTS; leave as spaces under Unix */
|
||||
break;
|
||||
@ -217,11 +219,6 @@ int mapname(__G__ renamed)
|
||||
*/
|
||||
if ((isprint(workch) || (128 <= workch && workch <= 254)))
|
||||
*pp++ = (char)workch;
|
||||
/*kos
|
||||
if (uO.cflxflag ||
|
||||
(isprint(workch) || (128 <= workch && workch <= 254)))
|
||||
*pp++ = (char)workch;
|
||||
*/
|
||||
} /* end switch */
|
||||
|
||||
} /* end while loop */
|
||||
@ -326,6 +323,9 @@ int mapname(__G__ renamed)
|
||||
checkdir(__G__ pathcomp, APPEND_NAME); /* returns 1 if truncated: care? */
|
||||
checkdir(__G__ G.filename, GETPATH);
|
||||
|
||||
fprintf(stderr, "mapname end[%s]\n", pathcomp);
|
||||
|
||||
|
||||
return error;
|
||||
|
||||
} /* end function mapname() */
|
||||
@ -467,6 +467,12 @@ int checkdir(__G__ pathcomp, flag)
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
if (FUNCTION == GETPATH) {
|
||||
if(G.native_is_utf8)
|
||||
{
|
||||
pathcomp[0] = 3; // kolibri utf8 flag
|
||||
strcpy(pathcomp + 1, G.buildpath);
|
||||
}
|
||||
else
|
||||
strcpy(pathcomp, G.buildpath);
|
||||
Trace((stderr, "getting and freeing path [%s]\n",
|
||||
FnFilter1(pathcomp)));
|
||||
|
@ -790,6 +790,10 @@ int unzip(__G__ argc, argv)
|
||||
* UnZip maintainer, a successful switch to "en-US.UTF-8"
|
||||
* resulted in garbage display of all non-basic ASCII characters.
|
||||
*/
|
||||
#ifdef KOS32
|
||||
/* manual override */
|
||||
G.native_is_utf8 = TRUE;
|
||||
#endif
|
||||
}
|
||||
# endif /* UTF8_MAYBE_NATIVE */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user