diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-11-21 16:35:17 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2022-11-21 18:58:51 +0000 |
commit | e15f8ff9db30c4e780973cef79e162baed6047c6 (patch) | |
tree | d73af5935cceb56721479331fdd2a901b7b083c7 /psi | |
parent | 31f96d10d419ca83c6d9bcafb2c635df35bb537c (diff) | |
download | ghostpdl-e15f8ff9db30c4e780973cef79e162baed6047c6.tar.gz |
Move gp_wutf8 functions to be gp_utf8.
Promote previously windows specific functions to be
generically available (and give them names that
reflect that).
Diffstat (limited to 'psi')
-rw-r--r-- | psi/dwmain.c | 14 | ||||
-rw-r--r-- | psi/dwmainc.c | 6 | ||||
-rw-r--r-- | psi/msvc.mak | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/psi/dwmain.c b/psi/dwmain.c index 8c301963a..b3fbcfb55 100644 --- a/psi/dwmain.c +++ b/psi/dwmain.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2022 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -103,9 +103,9 @@ int dwmain_add_file_control_path(const TCHAR *pathfile) { LPSTR p; int code, i; - p = malloc(wchar_to_utf8(NULL, (wchar_t *)pathfile)); + p = malloc(gp_uint16_to_utf8(NULL, (wchar_t *)pathfile)); if (p) { - wchar_to_utf8(p, (wchar_t *)pathfile); + gp_uint16_to_utf8(p, (wchar_t *)pathfile); for (i = 0; i < strlen(p); i++) { if (p[i] == '\\') { p[i] = '/'; @@ -123,9 +123,9 @@ void dwmain_remove_file_control_path(const TCHAR *pathfile) { LPSTR p; int i; - p = malloc(wchar_to_utf8(NULL, (wchar_t *)pathfile)); + p = malloc(gp_uint16_to_utf8(NULL, (wchar_t *)pathfile)); if (p) { - wchar_to_utf8(p, (wchar_t *)pathfile); + gp_uint16_to_utf8(p, (wchar_t *)pathfile); for (i = 0; i < strlen(p); i++) { if (p[i] == '\\') { p[i] = '/'; @@ -486,9 +486,9 @@ WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int cmd */ { wchar_t *uni = GetCommandLineW(); - pstart = p = malloc(wchar_to_utf8(NULL, uni)); + pstart = p = malloc(gp_uint16_to_utf8(NULL, uni)); if (p != NULL) - wchar_to_utf8(p, uni); + gp_uint16_to_utf8(p, uni); } argc = 0; diff --git a/psi/dwmainc.c b/psi/dwmainc.c index 7f3790ceb..09fbe445d 100644 --- a/psi/dwmainc.c +++ b/psi/dwmainc.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2021 Artifex Software, Inc. +/* Copyright (C) 2001-2022 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -759,10 +759,10 @@ int wmain(int argc, wchar_t *argv[], wchar_t *envp[]) { if (nargv == NULL) goto err; for (i=0; i < argc; i++) { - nargv[i] = malloc(wchar_to_utf8(NULL, argv[i])); + nargv[i] = malloc(gp_uint16_to_utf8(NULL, argv[i])); if (nargv[i] == NULL) goto err; - (void)wchar_to_utf8(nargv[i], argv[i]); + (void)gp_uint16_to_utf8(nargv[i], argv[i]); } code = main_utf8(argc, nargv); diff --git a/psi/msvc.mak b/psi/msvc.mak index dfbce3c69..852bd63a1 100644 --- a/psi/msvc.mak +++ b/psi/msvc.mak @@ -1988,7 +1988,7 @@ $(GPDLGEN)gpdllib.rsp: $(TOP_MAKEFILES) $(GS_XE): $(GSDLL_DLL) !else -$(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE) $(GLOBJ)gp_wutf8.$(OBJ) $(TOP_MAKEFILES) +$(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE) $(GLOBJ)gp_utf8.$(OBJ) $(TOP_MAKEFILES) echo /SUBSYSTEM:WINDOWS$(SUBSUBSYS) > $(PSGEN)gswin.rsp !if "$(PROFILE)"=="1" echo /Profile >> $(PSGEN)gswin.rsp @@ -2002,12 +2002,12 @@ $(GS_XE): $(GSDLL_DLL) $(DWOBJ) $(GSCONSOLE_XE) $(GLOBJ)gp_wutf8.$(OBJ) $(TOP_M !else echo /DEF:$(PSSRCDIR)\dwmain32.def /OUT:$(GS_XE) >> $(PSGEN)gswin.rsp !endif - $(LINK) $(LCT) @$(PSGEN)gswin.rsp $(DWOBJ) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_wutf8.$(OBJ) + $(LINK) $(LCT) @$(PSGEN)gswin.rsp $(DWOBJ) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_utf8.$(OBJ) del $(PSGEN)gswin.rsp !endif # The console mode small EXE loader -$(GSCONSOLE_XE): $(OBJC) $(GS_OBJ).res $(PSSRCDIR)\dw64c.def $(PSSRCDIR)\dw32c.def $(GLOBJ)gp_wutf8.$(OBJ) $(TOP_MAKEFILES) +$(GSCONSOLE_XE): $(OBJC) $(GS_OBJ).res $(PSSRCDIR)\dw64c.def $(PSSRCDIR)\dw32c.def $(GLOBJ)gp_utf8.$(OBJ) $(TOP_MAKEFILES) echo /SUBSYSTEM:CONSOLE$(SUBSUBSYS) > $(PSGEN)gswin.rsp !if "$(PROFILE)"=="1" echo /Profile >> $(PSGEN)gswin.rsp @@ -2021,7 +2021,7 @@ $(GSCONSOLE_XE): $(OBJC) $(GS_OBJ).res $(PSSRCDIR)\dw64c.def $(PSSRCDIR)\dw32c.d !else echo /DEF:$(PSSRCDIR)\dw32c.def /OUT:$(GSCONSOLE_XE) >> $(PSGEN)gswin.rsp !endif - $(LINK) $(LCT) @$(PSGEN)gswin.rsp $(OBJC) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_wutf8.$(OBJ) + $(LINK) $(LCT) @$(PSGEN)gswin.rsp $(OBJC) $(LINKLIBPATH) @$(LIBCTR) $(GS_OBJ).res $(GLOBJ)gp_utf8.$(OBJ) # The big DLL $(GSDLL_DLL): $(ECHOGS_XE) $(gs_tr) $(GS_ALL) $(DEVS_ALL) $(GSDLL_OBJS) $(GSDLL_OBJ).res $(PSGEN)lib.rsp \ |