diff --git a/qse/bld/watcom.txt b/qse/bld/watcom.txt new file mode 100644 index 00000000..6d8ce93c --- /dev/null +++ b/qse/bld/watcom.txt @@ -0,0 +1,45 @@ +Here are sample commands and linker files to use sample programs +using the watcom compiler and linker. + +------------------------------------------------------------------------ + +wcc386 -bt=os2 -zq -i=..\..\include -DNDEBUG -DQSE_CHAR_IS_WCHAR=1 -wx -d0 -bm -ot -ox ..\..\samples\cmn\dir01.c + +>>> dir01.lbc +option quiet +name dir01.exe +option caseexact + system os2v2 +file dir01.obj +library release-wchar-shared\qsecmn.lib + + +wlink @dir01.lbc + +------------------------------------------------------------------------ + +wcc386 -bt=dos -dDOS4GW -zq -i=..\..\include -DNDEBUG -DQSE_CHAR_IS_WCHAR=1 -wx -d0 -bm -ot -ox ..\..\samples\cmn\dir01.c + +>>> dir01.lbc +option quiet +name dir01.exe +option caseexact + system DOS4G +file dir01.obj +library release-wchar-static\qsecmn.lib +option stack=256k + +wlink @dir01.lbc +------------------------------------------------------------------------ + +wcc386 -bt=nt -zq -i=..\..\include -DNDEBUG -DQSE_CHAR_IS_WCHAR=1 -wx -d0 -bm -ot -ox ..\..\samples\cmn\dir01.c + +>>> dir01.lbc +option quiet +name dir01.exe +option caseexact + system nt ref 'main_' +file dir01.obj +library release-wchar-shared\qsecmn.lib + +wlink @dir01.lbc diff --git a/qse/lib/cmn/glob.c b/qse/lib/cmn/glob.c index 7b3b6f58..5e8a6761 100644 --- a/qse/lib/cmn/glob.c +++ b/qse/lib/cmn/glob.c @@ -115,7 +115,7 @@ typedef enum segment_type_t segment_type_t; #define get_next_segment mbs_get_next_segment #define handle_non_wild_segments mbs_handle_non_wild_segments #define CHAR_IS_MCHAR -#undef DECLARE_MBUF +#undef INCLUDE_MBUF #include "glob.h" /* -------------------------------------------------------------------- */ @@ -156,7 +156,7 @@ typedef enum segment_type_t segment_type_t; #undef get_next_segment #undef handle_non_wild_segments #undef CHAR_IS_MCHAR -#undef DECLARE_MBUF +#undef INCLUDE_MBUF /* -------------------------------------------------------------------- */ @@ -198,6 +198,6 @@ typedef enum segment_type_t segment_type_t; #define handle_non_wild_segments wcs_handle_non_wild_segments #undef CHAR_IS_MCHAR #if !defined(_WIN32) -# define DECLARE_MBUF 1 +# define INCLUDE_MBUF 1 #endif #include "glob.h" diff --git a/qse/lib/cmn/glob.h b/qse/lib/cmn/glob.h index d9fc626e..a3da9433 100644 --- a/qse/lib/cmn/glob.h +++ b/qse/lib/cmn/glob.h @@ -41,7 +41,7 @@ struct glob_t str_t path; str_t tbuf; /* temporary buffer */ -#if defined(DECLARE_MBUF) +#if defined(INCLUDE_MBUF) qse_mbs_t mbuf; #endif @@ -83,7 +83,7 @@ struct stack_node_t }; #endif -#if defined(DECLARE_MBUF) +#if defined(INCLUDE_MBUF) static qse_mchar_t* wcs_to_mbuf (glob_t* g, const qse_wchar_t* wcs, qse_mbs_t* mbs) { qse_size_t ml, wl; @@ -104,6 +104,7 @@ static int path_exists (glob_t* g, const char_t* name) #if !defined(INVALID_FILE_ATTRIBUTES) #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) #endif + #if defined(CHAR_IS_MCHAR) return (GetFileAttributesA(name) != INVALID_FILE_ATTRIBUTES)? 1: 0; #else @@ -563,7 +564,7 @@ int glob (const char_t* pattern, cbimpl_t cbimpl, void* cbctx, int flags, qse_mm return -1; } -#if defined(DECLARE_MBUF) +#if defined(INCLUDE_MBUF) if (qse_mbs_init (&g.mbuf, mmgr, 512) <= -1) { str_fini (&g.path); @@ -579,7 +580,7 @@ int glob (const char_t* pattern, cbimpl_t cbimpl, void* cbctx, int flags, qse_mm x = search (&g, &seg); -#if defined(DECLARE_MBUF) +#if defined(INCLUDE_MBUF) qse_mbs_fini (&g.mbuf); #endif str_fini (&g.tbuf); diff --git a/qse/lib/cmn/mbwc.c b/qse/lib/cmn/mbwc.c index 932a6b08..702ed58e 100644 --- a/qse/lib/cmn/mbwc.c +++ b/qse/lib/cmn/mbwc.c @@ -48,7 +48,6 @@ static qse_cmgr_t builtin_cmgr[] = { qse_cp949touc, qse_uctocp949 }, { qse_cp950touc, qse_uctocp950 } #endif - }; static qse_cmgr_t* dfl_cmgr = &builtin_cmgr[QSE_CMGR_SLMB]; diff --git a/qse/lib/http/httpd-dir.c b/qse/lib/http/httpd-dir.c index 86a6586b..75ed4685 100644 --- a/qse/lib/http/httpd-dir.c +++ b/qse/lib/http/httpd-dir.c @@ -148,7 +148,6 @@ static qse_size_t format_dirent ( const qse_httpd_dirent_t* dirent, qse_mchar_t* buf, int bufsz) { -/* TODO: page encoding?? utf-8??? or derive name from cmgr or current locale??? */ qse_size_t x; qse_mchar_t* encname; @@ -332,8 +331,11 @@ static int task_main_dseg ( qpath_esc = qse_httpd_escapehtml (httpd, ctx->qpath.ptr); if (qpath_esc == QSE_NULL) return -1; + /* TODO: page encoding?? utf-8??? or derive name from cmgr or current locale??? */ + /* TODO: SUPPORT character set. DON't HARD_CODE it to UTF8 */ x = qse_mbsxfmts (&ctx->buf[ctx->buflen], ctx->bufrem, - QSE_MT("
%s\n\n.. |