From 833501b319ba92edcf69ebbecc27cd6b3dbdad0c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 22 Mar 2020 21:16:21 +0000 Subject: Even more uppercase HEX representations in source-code --- generic/regcustom.h | 4 ++-- generic/regguts.h | 4 ++-- win/tclWin32Dll.c | 8 ++++---- win/tclWinChan.c | 6 +++--- win/tclWinFCmd.c | 28 ++++++++++++++-------------- win/tclWinInit.c | 2 +- win/tclWinPipe.c | 4 ++-- win/tclWinPort.h | 4 ++-- win/tclWinTest.c | 2 +- win/tclWinTime.c | 6 +++--- 10 files changed, 34 insertions(+), 34 deletions(-) diff --git a/generic/regcustom.h b/generic/regcustom.h index e7bdca7..f6bf60c 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -92,11 +92,11 @@ typedef int celt; /* Type to hold chr, or NOCELT */ #if TCL_UTF_MAX > 4 #define CHRBITS 32 /* Bits in a chr; must not use sizeof */ #define CHR_MIN 0x00000000 /* Smallest and largest chr; the value */ -#define CHR_MAX 0xffffffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */ +#define CHR_MAX 0xFFFFFFFF /* CHR_MAX-CHR_MIN+1 should fit in uchr */ #else #define CHRBITS 16 /* Bits in a chr; must not use sizeof */ #define CHR_MIN 0x0000 /* Smallest and largest chr; the value */ -#define CHR_MAX 0xffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */ +#define CHR_MAX 0xFFFF /* CHR_MAX-CHR_MIN+1 should fit in uchr */ #endif /* diff --git a/generic/regguts.h b/generic/regguts.h index e10711d..71d04f3 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -101,7 +101,7 @@ #define DUPMAX _POSIX2_RE_DUP_MAX #define DUPINF (DUPMAX+1) -#define REMAGIC 0xfed7 /* magic number for main struct */ +#define REMAGIC 0xFED7 /* magic number for main struct */ /* * debugging facilities @@ -417,7 +417,7 @@ struct fns { struct guts { int magic; -#define GUTSMAGIC 0xfed9 +#define GUTSMAGIC 0xFED9 int cflags; /* copy of compile flags */ long info; /* copy of re_info */ size_t nsub; /* copy of re_nsub */ diff --git a/win/tclWin32Dll.c b/win/tclWin32Dll.c index e77fbc0..ccc1dae 100644 --- a/win/tclWin32Dll.c +++ b/win/tclWin32Dll.c @@ -717,7 +717,7 @@ TclWinCPUID( "movl %%eax, 0x0(%%edi)" "\n\t" "movl %%ebx, 0x4(%%edi)" "\n\t" "movl %%ecx, 0x8(%%edi)" "\n\t" - "movl %%edx, 0xc(%%edi)" "\n\t" + "movl %%edx, 0xC(%%edi)" "\n\t" : /* No outputs */ @@ -749,7 +749,7 @@ TclWinCPUID( "leal 1f, %%eax" "\n\t" "movl %%eax, 0x4(%%edx)" "\n\t" /* handler */ "movl %%ebp, 0x8(%%edx)" "\n\t" /* ebp */ - "movl %%esp, 0xc(%%edx)" "\n\t" /* esp */ + "movl %%esp, 0xC(%%edx)" "\n\t" /* esp */ "movl %[error], 0x10(%%edx)" "\n\t" /* status */ /* @@ -769,7 +769,7 @@ TclWinCPUID( "movl %%eax, 0x0(%%edi)" "\n\t" "movl %%ebx, 0x4(%%edi)" "\n\t" "movl %%ecx, 0x8(%%edi)" "\n\t" - "movl %%edx, 0xc(%%edi)" "\n\t" + "movl %%edx, 0xC(%%edi)" "\n\t" /* * Come here on a normal exit. Recover the TCLEXCEPTION_REGISTRATION and @@ -796,7 +796,7 @@ TclWinCPUID( */ "2:" "\t" - "movl 0xc(%%edx), %%esp" "\n\t" + "movl 0xC(%%edx), %%esp" "\n\t" "movl 0x8(%%edx), %%ebp" "\n\t" "movl 0x0(%%edx), %%eax" "\n\t" "movl %%eax, %%fs:0" "\n\t" diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 54d0c84..4f210cb 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -968,7 +968,7 @@ TclpOpenFileChannel( if (handle == INVALID_HANDLE_VALUE) { DWORD err = GetLastError(); - if ((err & 0xffffL) == ERROR_OPEN_FAILED) { + if ((err & 0xFFFFL) == ERROR_OPEN_FAILED) { err = (mode & O_CREAT) ? ERROR_FILE_EXISTS : ERROR_FILE_NOT_FOUND; } TclWinConvertError(err); @@ -1158,7 +1158,7 @@ Tcl_MakeFileChannel( "leal 1f, %%eax" "\n\t" "movl %%eax, 0x4(%%edx)" "\n\t" /* handler */ "movl %%ebp, 0x8(%%edx)" "\n\t" /* ebp */ - "movl %%esp, 0xc(%%edx)" "\n\t" /* esp */ + "movl %%esp, 0xC(%%edx)" "\n\t" /* esp */ "movl $0, 0x10(%%edx)" "\n\t" /* status */ /* @@ -1198,7 +1198,7 @@ Tcl_MakeFileChannel( */ "2:" "\t" - "movl 0xc(%%edx), %%esp" "\n\t" + "movl 0xC(%%edx), %%esp" "\n\t" "movl 0x8(%%edx), %%ebp" "\n\t" "movl 0x0(%%edx), %%eax" "\n\t" "movl %%eax, %%fs:0" "\n\t" diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 9df9d82..357f0a1 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -204,7 +204,7 @@ DoRenameFile( "leal 1f, %%eax" "\n\t" "movl %%eax, 0x4(%%edx)" "\n\t" /* handler */ "movl %%ebp, 0x8(%%edx)" "\n\t" /* ebp */ - "movl %%esp, 0xc(%%edx)" "\n\t" /* esp */ + "movl %%esp, 0xC(%%edx)" "\n\t" /* esp */ "movl $0, 0x10(%%edx)" "\n\t" /* status */ /* @@ -245,7 +245,7 @@ DoRenameFile( */ "2:" "\t" - "movl 0xc(%%edx), %%esp" "\n\t" + "movl 0xC(%%edx), %%esp" "\n\t" "movl 0x8(%%edx), %%ebp" "\n\t" "movl 0x0(%%edx), %%eax" "\n\t" "movl %%eax, %%fs:0" "\n\t" @@ -283,7 +283,7 @@ DoRenameFile( srcAttr = GetFileAttributesW(nativeSrc); dstAttr = GetFileAttributesW(nativeDst); - if (srcAttr == 0xffffffff) { + if (srcAttr == 0xFFFFFFFF) { if (GetFullPathNameW(nativeSrc, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; @@ -291,7 +291,7 @@ DoRenameFile( } srcAttr = 0; } - if (dstAttr == 0xffffffff) { + if (dstAttr == 0xFFFFFFFF) { if (GetFullPathNameW(nativeDst, 0, NULL, NULL) >= MAX_PATH) { errno = ENAMETOOLONG; @@ -591,7 +591,7 @@ DoCopyFile( "leal 1f, %%eax" "\n\t" "movl %%eax, 0x4(%%edx)" "\n\t" /* handler */ "movl %%ebp, 0x8(%%edx)" "\n\t" /* ebp */ - "movl %%esp, 0xc(%%edx)" "\n\t" /* esp */ + "movl %%esp, 0xC(%%edx)" "\n\t" /* esp */ "movl $0, 0x10(%%edx)" "\n\t" /* status */ /* @@ -633,7 +633,7 @@ DoCopyFile( */ "2:" "\t" - "movl 0xc(%%edx), %%esp" "\n\t" + "movl 0xC(%%edx), %%esp" "\n\t" "movl 0x8(%%edx), %%ebp" "\n\t" "movl 0x0(%%edx), %%eax" "\n\t" "movl %%eax, %%fs:0" "\n\t" @@ -677,8 +677,8 @@ DoCopyFile( srcAttr = GetFileAttributesW(nativeSrc); dstAttr = GetFileAttributesW(nativeDst); - if (srcAttr != 0xffffffff) { - if (dstAttr == 0xffffffff) { + if (srcAttr != 0xFFFFFFFF) { + if (dstAttr == 0xFFFFFFFF) { dstAttr = 0; } if ((srcAttr & FILE_ATTRIBUTE_DIRECTORY) || @@ -768,7 +768,7 @@ TclpDeleteFile( if (Tcl_GetErrno() == EACCES) { attr = GetFileAttributesW(path); - if (attr != 0xffffffff) { + if (attr != 0xFFFFFFFF) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { if (attr & FILE_ATTRIBUTE_REPARSE_POINT) { /* @@ -803,7 +803,7 @@ TclpDeleteFile( } } else if (Tcl_GetErrno() == ENOENT) { attr = GetFileAttributesW(path); - if (attr != 0xffffffff) { + if (attr != 0xFFFFFFFF) { if (attr & FILE_ATTRIBUTE_DIRECTORY) { /* * Windows 95 reports removing a directory as ENOENT instead @@ -1053,7 +1053,7 @@ DoRemoveJustDirectory( if (Tcl_GetErrno() == EACCES) { attr = GetFileAttributesW(nativePath); - if (attr != 0xffffffff) { + if (attr != 0xFFFFFFFF) { if ((attr & FILE_ATTRIBUTE_DIRECTORY) == 0) { /* * Windows 95 reports calling RemoveDirectory on a file as an @@ -1195,7 +1195,7 @@ TraverseWinTree( oldSourceLen = Tcl_DStringLength(sourcePtr); sourceAttr = GetFileAttributesW(nativeSource); - if (sourceAttr == 0xffffffff) { + if (sourceAttr == 0xFFFFFFFF) { nativeErrfile = nativeSource; goto end; } @@ -1509,7 +1509,7 @@ GetWinFileAttributes( nativeName = Tcl_FSGetNativePath(fileName); result = GetFileAttributesW(nativeName); - if (result == 0xffffffff) { + if (result == 0xFFFFFFFF) { StatError(interp, fileName); return TCL_ERROR; } @@ -1836,7 +1836,7 @@ SetWinFileAttributes( nativeName = Tcl_FSGetNativePath(fileName); fileAttributes = old = GetFileAttributesW(nativeName); - if (fileAttributes == 0xffffffff) { + if (fileAttributes == 0xFFFFFFFF) { StatError(interp, fileName); return TCL_ERROR; } diff --git a/win/tclWinInit.c b/win/tclWinInit.c index 97e0a43..558ffc4 100644 --- a/win/tclWinInit.c +++ b/win/tclWinInit.c @@ -687,7 +687,7 @@ TclpSetVariables( # define tenviron _wenviron # define tenviron2utfdstr(tenvstr, len, dstr) \ Tcl_WinTCharToUtf((TCHAR *)tenvstr, len, dstr) -#else +#else # define tenviron environ # define tenviron2utfdstr(tenvstr, len, dstr) \ Tcl_ExternalToUtfDString(NULL, tenvstr, len, dstr) diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 6120358..69c38d4 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -609,7 +609,7 @@ TclpOpenFile( DWORD err; err = GetLastError(); - if ((err & 0xffffL) == ERROR_OPEN_FAILED) { + if ((err & 0xFFFFL) == ERROR_OPEN_FAILED) { err = (mode & O_CREAT) ? ERROR_FILE_EXISTS : ERROR_FILE_NOT_FOUND; } TclWinConvertError(err); @@ -1322,7 +1322,7 @@ ApplicationType( */ attr = GetFileAttributesW(nativeFullPath); - if ((attr == 0xffffffff) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { + if ((attr == 0xFFFFFFFF) || (attr & FILE_ATTRIBUTE_DIRECTORY)) { continue; } strcpy(fullName, Tcl_WinTCharToUtf((TCHAR *)nativeFullPath, -1, &ds)); diff --git a/win/tclWinPort.h b/win/tclWinPort.h index ea8fd7e..aaaa9c7 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -315,7 +315,7 @@ typedef DWORD_PTR * PDWORD_PTR; #endif #ifndef WTERMSIG -# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7f) +# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7F) #endif #ifndef WIFSTOPPED @@ -323,7 +323,7 @@ typedef DWORD_PTR * PDWORD_PTR; #endif #ifndef WSTOPSIG -# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xff) +# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xFF) #endif /* diff --git a/win/tclWinTest.c b/win/tclWinTest.c index dd4d5ec..8525718 100644 --- a/win/tclWinTest.c +++ b/win/tclWinTest.c @@ -461,7 +461,7 @@ TestplatformChmod( * nativePath not found */ - if (attr == 0xffffffff) { + if (attr == 0xFFFFFFFF) { res = -1; goto done; } diff --git a/win/tclWinTime.c b/win/tclWinTime.c index 33d87a7..a434d86 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -519,9 +519,9 @@ NativeGetMicroseconds(void) GetSystemInfo(&systemInfo); if (TclWinCPUID(0, regs) == TCL_OK - && regs[1] == 0x756e6547 /* "Genu" */ - && regs[3] == 0x49656e69 /* "ineI" */ - && regs[2] == 0x6c65746e /* "ntel" */ + && regs[1] == 0x756E6547 /* "Genu" */ + && regs[3] == 0x49656E69 /* "ineI" */ + && regs[2] == 0x6C65746E /* "ntel" */ && TclWinCPUID(1, regs) == TCL_OK && ((regs[0]&0x00000F00) == 0x00000F00 /* Pentium 4 */ || ((regs[0] & 0x00F00000) /* Extended family */ -- cgit v0.12