Adapting CHAR4_TO_DWORD-style constructions. No change in exehead.

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6054 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
wizou 2010-04-14 15:51:48 +00:00
parent 759ae312b5
commit 408a5d5169
5 changed files with 26 additions and 38 deletions

View file

@ -48,16 +48,6 @@ TCHAR *WINAPI STRDUP(const TCHAR *c)
return lstrcpy(t,c);
}
// Turn a pair of chars into a word
// Turn four chars into a dword
#ifdef __BIG_ENDIAN__ // Not very likely, but, still...
#define CHAR2_TO_WORD(a,b) (((WORD)(b))|((a)<<8))
#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(c,d))|(CHAR2_TO_WORD(a,b)<<16))
#else
#define CHAR2_TO_WORD(a,b) (((WORD)(a))|((b)<<8))
#define CHAR4_TO_DWORD(a,b,c,d) (((DWORD)CHAR2_TO_WORD(a,b))|(CHAR2_TO_WORD(c,d)<<16))
#endif
// Field types
// NB - the order of this list is important - see below