Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.
Compiler output is identical before & after this step git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4e48722b63
commit
752d7d239a
209 changed files with 9698 additions and 7658 deletions
|
@ -6,6 +6,9 @@
|
|||
** License: see jnetlib.h
|
||||
*/
|
||||
|
||||
// Reviewed for Unicode support by Jim Park -- 08/16/2007
|
||||
// Note: For Unicode Support, all string functions must explicitly use
|
||||
// ANSI versions if UNICODE is defined.
|
||||
|
||||
#include "netinc.h"
|
||||
#include "util.h"
|
||||
|
@ -57,14 +60,14 @@ int JNL_AsyncDNS::resolve(char *hostname, unsigned long *addr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (lstrcmpi(m_hostname,hostname)) m_addr=0;
|
||||
if (lstrcmpiA(m_hostname,hostname)) m_addr=0;
|
||||
else if (m_addr == INADDR_NONE) return -1;
|
||||
else if (m_addr)
|
||||
{
|
||||
*addr=m_addr;
|
||||
return 0;
|
||||
}
|
||||
lstrcpy(m_hostname,hostname);
|
||||
lstrcpyA(m_hostname,hostname);
|
||||
|
||||
if (m_thread_kill)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
** 4. enjoy.
|
||||
*/
|
||||
|
||||
// Reviewed for Unicode support by Jim Park -- 08/16/2007
|
||||
// Note: Inet host name is strictly ANSI, no UNICODE for now.
|
||||
|
||||
#ifndef _ASYNCDNS_H_
|
||||
#define _ASYNCDNS_H_
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
** Author: Justin Frankel
|
||||
** File: connection.cpp - JNL TCP connection implementation
|
||||
** License: see jnetlib.h
|
||||
**
|
||||
** Reviewed for Unicode support by Jim Park -- 08/17/2007
|
||||
*/
|
||||
|
||||
#include "netinc.h"
|
||||
|
|
|
@ -50,6 +50,8 @@
|
|||
** make the socket close after sending all the data sent.
|
||||
**
|
||||
** 8. delete ye' ol' object.
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
*/
|
||||
|
||||
#ifndef _CONNECTION_H_
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
** Author: Justin Frankel
|
||||
** File: httpget.cpp - JNL HTTP GET implementation
|
||||
** License: see jnetlib.h
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
** Note: The functions that work on char's should be explicitely set to use the
|
||||
** ANSI versions. Some of the functions like wprintf() are #defined to be
|
||||
** the wide-char versions when _UNICODE is defined. So these must be explictly
|
||||
** set to use the ANSI versions.
|
||||
*/
|
||||
|
||||
#include "netinc.h"
|
||||
|
@ -181,14 +187,14 @@ void JNL_HTTPGet::connect(char *url)
|
|||
|
||||
if (!m_http_proxyhost || !m_http_proxyhost[0])
|
||||
{
|
||||
wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_request);
|
||||
wsprintfA(str,"GET %s HTTP/1.0\r\n",m_http_request);
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintf(str,"GET %s HTTP/1.0\r\n",m_http_url);
|
||||
wsprintfA(str,"GET %s HTTP/1.0\r\n",m_http_url);
|
||||
}
|
||||
|
||||
wsprintf(str+strlen(str),"Host: %s\r\n",m_http_host);
|
||||
wsprintfA(str+strlen(str),"Host: %s\r\n",m_http_host);
|
||||
|
||||
if (m_http_lpinfo&&m_http_lpinfo[0])
|
||||
{
|
||||
|
|
|
@ -37,6 +37,12 @@
|
|||
** note that user, pass, port, and /requestwhatever are all optional :)
|
||||
** note that also, http:// is really not important. if you do poo://
|
||||
** or even leave out the http:// altogether, it will still work.
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
** Note: The functions that work on char's should be explicitely set to use the
|
||||
** ANSI versions. Some of the functions like wprintf() are #defined to be
|
||||
** the wide-char versions when _UNICODE is defined. So these must be explictly
|
||||
** set to use the ANSI versions.
|
||||
*/
|
||||
|
||||
#ifndef _HTTPGET_H_
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
** Author: Justin Frankel
|
||||
** File: netinc.h - network includes and portability defines (used internally)
|
||||
** License: see jnetlib.h
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
** Note: The functions that work on char's should be explicitely set to use the
|
||||
** ANSI versions. Some of the functions like lstrcpy() are #defined to be
|
||||
** the wide-char versions when _UNICODE is defined. So these must be explictly
|
||||
** set to use the ANSI versions.
|
||||
*/
|
||||
|
||||
#ifndef _NETINC_H_
|
||||
|
@ -72,10 +78,10 @@ extern void mini_memset(void *,char,int);
|
|||
extern void mini_memcpy(void *,void*,int);
|
||||
#define memset mini_memset
|
||||
#define memcpy mini_memcpy
|
||||
#define strcpy lstrcpy
|
||||
#define strncpy lstrcpyn
|
||||
#define strcat lstrcat
|
||||
#define strlen lstrlen
|
||||
#define strcpy lstrcpyA
|
||||
#define strncpy lstrcpynA
|
||||
#define strcat lstrcatA
|
||||
#define strlen lstrlenA
|
||||
#define malloc(x) GlobalAlloc(GPTR,(x))
|
||||
#define free(x) { if (x) GlobalFree(x); }
|
||||
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
** Author: Justin Frankel
|
||||
** File: util.cpp - JNL implementation of basic network utilities
|
||||
** License: see jnetlib.h
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
** Note: The functions that work on char's should be explicitely set to use the
|
||||
** ANSI versions. Some of the functions like wprintf() are #defined to be
|
||||
** the wide-char versions when _UNICODE is defined. So these must be explictly
|
||||
** set to use the ANSI versions.
|
||||
*/
|
||||
|
||||
#include "netinc.h"
|
||||
|
|
|
@ -22,6 +22,11 @@
|
|||
** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen);
|
||||
** gives you the dotted decimal notation of an integer ip address.
|
||||
**
|
||||
** Reviewed for Unicode Support by Jim Park -- 08/17/2007
|
||||
** Note: The functions that work on char's should be explicitely set to use the
|
||||
** ANSI versions. Some of the functions like wprintf() are #defined to be
|
||||
** the wide-char versions when _UNICODE is defined. So these must be explictly
|
||||
** set to use the ANSI versions.
|
||||
*/
|
||||
|
||||
#ifndef _UTIL_H_
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue