Skip to content

Commit 4f714d5

Browse files
author
d3x0r
committed
Mass update refactoring base types to stdint types.
1 parent 841ff7b commit 4f714d5

File tree

883 files changed

+17092
-17087
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

883 files changed

+17092
-17087
lines changed

config/deadmain.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main( void )
2121
printf( "rt_init size=%ld\n", sizeof( struct rt_init ) );
2222
printf( "begin=%p\n", begin );
2323
printf( "end=%p\n", end );
24-
printf( "extra=%ld\n", ((PTRSZVAL)end - (PTRSZVAL)begin)%sizeof( struct rt_init ) );
24+
printf( "extra=%ld\n", ((uintptr_t)end - (uintptr_t)begin)%sizeof( struct rt_init ) );
2525
for( current = begin; current < end; current++ )
2626
{
2727
printf( "Entry %p(%d) = %s %s(%d)\n"

include/colordef.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ SACK_NAMESPACE
5151

5252
#else
5353
#if defined( _OPENGL_DRIVER ) || defined( USE_OPENGL_COMPAT_COLORS )
54-
# define Color( r,g,b ) (((_32)( ((_8)(r))|((_16)((_8)(g))<<8))|(((_32)((_8)(b))<<16)))|0xFF000000)
55-
# define AColor( r,g,b,a ) (((_32)( ((_8)(r))|((_16)((_8)(g))<<8))|(((_32)((_8)(b))<<16)))|((a)<<24))
54+
# define Color( r,g,b ) (((uint32_t)( ((uint8_t)(r))|((uint16_t)((uint8_t)(g))<<8))|(((uint32_t)((uint8_t)(b))<<16)))|0xFF000000)
55+
# define AColor( r,g,b,a ) (((uint32_t)( ((uint8_t)(r))|((uint16_t)((uint8_t)(g))<<8))|(((uint32_t)((uint8_t)(b))<<16)))|((a)<<24))
5656
# define SetAlpha( rgb, a ) ( ((rgb)&0x00FFFFFF) | ( (a)<<24 ) )
5757
# define SetGreen( rgb, g ) ( ((rgb)&0xFFFF00FF) | ( ((g)&0xFF)<<8 ) )
5858
# define SetBlue( rgb, b ) ( ((rgb)&0xFF00FFFF) | ( ((b)&0xFF)<<16 ) )
@@ -77,9 +77,9 @@ SACK_NAMESPACE
7777
CDATA color3 = Color( 0,0,255); // blue only, this is birght blue
7878
CDATA color4 = Color(93,93,32); // this is probably a goldish grey
7979
</code> */
80-
#define Color( r,g,b ) (((_32)( ((_8)((b)AND_FF))|((_16)((_8)((g))AND_FF)<<8))|(((_32)((_8)((r))AND_FF)<<16)))|0xFF000000)
80+
#define Color( r,g,b ) (((uint32_t)( ((uint8_t)((b)AND_FF))|((uint16_t)((uint8_t)((g))AND_FF)<<8))|(((uint32_t)((uint8_t)((r))AND_FF)<<16)))|0xFF000000)
8181
/* Build a color with alpha specified. */
82-
#define AColor( r,g,b,a ) (((_32)( ((_8)((b)AND_FF))|((_16)((_8)((g))AND_FF)<<8))|(((_32)((_8)((r))AND_FF)<<16)))|(((a)AND_FF)<<24))
82+
#define AColor( r,g,b,a ) (((uint32_t)( ((uint8_t)((b)AND_FF))|((uint16_t)((uint8_t)((g))AND_FF)<<8))|(((uint32_t)((uint8_t)((r))AND_FF)<<16)))|(((a)AND_FF)<<24))
8383
/* Sets the alpha part of a color. (0-255 value, 0 being
8484
transparent, and 255 solid(opaque))
8585
Example
@@ -116,9 +116,9 @@ SACK_NAMESPACE
116116
/* a 4 byte array of color (not really used, we mostly went with CDATA and PCDATA instead of COLOR and PCOLOR */
117117
typedef COLOR_CHANNEL COLOR[4];
118118
// color data raw...
119-
typedef _32 CDATA;
119+
typedef uint32_t CDATA;
120120
/* pointer to an array of 32 bit colors */
121-
typedef _32 *PCDATA;
121+
typedef uint32_t *PCDATA;
122122
/* A Pointer to <link COLOR>. Probably an array of color (a
123123
block of pixels for instance) */
124124
typedef COLOR *PCOLOR;

include/configscript.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ CONFIGSCR_PROC( LOGICAL, BeginNamedConfiguration )( PCONFIG_HANDLER pch, CTEXTST
9898
// use this to restore the prior configuration state.
9999
CONFIGSCR_PROC( void, EndConfiguration )( PCONFIG_HANDLER pch );
100100

101-
typedef PTRSZVAL (CPROC*USER_CONFIG_HANDLER)( PTRSZVAL, arg_list args );
101+
typedef uintptr_t (CPROC*USER_CONFIG_HANDLER)( uintptr_t, arg_list args );
102102
CONFIGSCR_PROC( void, AddConfigurationEx )( PCONFIG_HANDLER pch
103103
, CTEXTSTR format
104104
, USER_CONFIG_HANDLER Process DBG_PASS );
@@ -110,7 +110,7 @@ CONFIGSCR_PROC( void, AddConfigurationEx )( PCONFIG_HANDLER pch
110110
#define AddConfiguration(pch,f,pr) AddConfigurationEx(pch,f,pr DBG_SRC )
111111
#define AddConfigurationMethod AddConfiguration
112112

113-
// FILTER receives a ptrszval that was given at configuration (addition to handler)
113+
// FILTER receives a uintptr_t that was given at configuration (addition to handler)
114114
// it receives a PTEXT block of (binary) data... and must result with
115115
// PTEXT segments which are lines which may or may not have \r\n\\ all
116116
// of which are removed before being resulted to the application.
@@ -120,15 +120,15 @@ CONFIGSCR_PROC( void, AddConfigurationEx )( PCONFIG_HANDLER pch
120120
typedef PTEXT (CPROC*USER_FILTER)( POINTER *, PTEXT );
121121
CONFIGSCR_PROC( void, AddConfigurationFilter )( PCONFIG_HANDLER pch, USER_FILTER filter );
122122
CONFIGSCR_PROC( void, ClearDefaultFilters )( PCONFIG_HANDLER pch );
123-
CONFIGSCR_PROC( void, SetConfigurationEndProc )( PCONFIG_HANDLER pch, PTRSZVAL (CPROC *Process)( PTRSZVAL ) );
123+
CONFIGSCR_PROC( void, SetConfigurationEndProc )( PCONFIG_HANDLER pch, uintptr_t (CPROC *Process)( uintptr_t ) );
124124
CONFIGSCR_PROC( void, SetConfigurationUnhandled )( PCONFIG_HANDLER pch
125-
, PTRSZVAL (CPROC *Process)( PTRSZVAL, CTEXTSTR ) );
125+
, uintptr_t (CPROC *Process)( uintptr_t, CTEXTSTR ) );
126126

127127
CONFIGSCR_PROC( int, ProcessConfigurationFile )( PCONFIG_HANDLER pch
128128
, CTEXTSTR name
129-
, PTRSZVAL psv
129+
, uintptr_t psv
130130
);
131-
CONFIGSCR_PROC( PTRSZVAL, ProcessConfigurationInput )( PCONFIG_HANDLER pch, CTEXTSTR block, int size, PTRSZVAL psv );
131+
CONFIGSCR_PROC( uintptr_t, ProcessConfigurationInput )( PCONFIG_HANDLER pch, CTEXTSTR block, int size, uintptr_t psv );
132132

133133
/*
134134
* TO BE IMPLEMENTED
@@ -153,7 +153,7 @@ CONFIGSCR_PROC( void, ExpandConfigString )( TEXTSTR out, CTEXTSTR in );
153153

154154
#ifdef __cplusplus
155155

156-
//typedef PTRSZVAL CPROC ::(*USER_CONFIG_METHOD)( ... );
156+
//typedef uintptr_t CPROC ::(*USER_CONFIG_METHOD)( ... );
157157

158158
typedef class config_reader {
159159
PCONFIG_HANDLER pch;
@@ -174,7 +174,7 @@ typedef class config_reader {
174174
{
175175
union {
176176
struct {
177-
_32 junk;
177+
uint32_t junk;
178178
USER_CONFIG_HANDLER Process
179179
} c;
180180
USER_CONFIG_METHOD Process;
@@ -185,7 +185,7 @@ typedef class config_reader {
185185
*/
186186
inline int go( CTEXTSTR file, POINTER p )
187187
{
188-
return ProcessConfigurationFile( pch, file, (PTRSZVAL)p );
188+
return ProcessConfigurationFile( pch, file, (uintptr_t)p );
189189
}
190190
} CONFIG_READER;
191191

0 commit comments

Comments
 (0)