Coding style fixups

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@22020 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-11-16 11:40:31 +00:00
parent 5de50d17fd
commit 08c5a3d3d0
31 changed files with 215 additions and 180 deletions

View file

@ -1,3 +1,38 @@
2005-11-16 Richard Frith-Macdonald <rfm@gnu.org>
* Source/art/composite.m:
* Source/art/ftfont-old.m:
* Source/art/ftfont.m:
* Source/art/shfill.m:
* Source/cairo/CairoDevice.m:
* Source/cairo/CairoFreeTypeFontInfo.m:
* Source/cairo/CairoGState.m:
* Source/gsc/GSContext.m:
* Source/gsc/GSStreamContext.m:
* Source/win32/GSDisplayServer_details.m:
* Source/win32/WIN32Server.m:
* Source/win32/w32_activate.m:
* Source/win32/w32_debug.m:
* Source/win32/w32_movesize.m:
* Source/win32/w32_notifications.m:
* Source/win32/w32_windowdisplay.m:
* Source/winlib/WIN32GState.m:
* Source/x11/XGGLContext.m:
* Source/x11/XGGLFormat.m:
* Source/x11/XGServerEvent.m:
* Source/x11/XGServerWindow.m:
* Source/xdps/AFMFileFontInfo.m:
* Source/xdps/NSDPSContext.m:
* Source/xdps/NSDPSContextOps.m:
* Source/xlib/XGBitmap.m:
* Source/xlib/XGCommonFont.m:
* Source/xlib/XGFontSetFontInfo.m:
* Source/xlib/XGGState.m:
* Tools/font_cacher.m:
* Tools/xpbs.m:
Some fixups for coding style violations. Should have no effect other
than to render code more consistent/readable.
2005-11-07 Fred Kiefer <FredKiefer@gmx.de>
* Source/x11/XGServerWindow.m (_createNetIcon, _setNetWMIconFor:):

View file

@ -1279,7 +1279,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
}
#define DO_STUFF( HANDLE_SPAN ) \
#define DO_STUFF(HANDLE_SPAN) \
{ \
int y; \
int x0, x1; \
@ -1381,7 +1381,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
memset(dst, 0, n * DI.bytes_per_pixel);
if (!DI.inline_alpha)
memset(dst_alpha, 0, n);
)
)
}
else if (op == NSCompositeHighlight)
{
@ -1392,7 +1392,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
for (; n; n--, d++)
(*d) ^= 0xff;
}
)
)
}
else if (op == NSCompositeCopy)
{
@ -1425,7 +1425,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
memset(dst_alpha, ri.a, n);
}
}
)
)
}
else if (blit_func)
{
@ -1473,7 +1473,7 @@ static BOOL _rect_advance(rect_trace_t *t, int *x0, int *x1)
c.dst = dst;
c.dsta = dst_alpha;
blit_func(&c, n);
)
)
}
else
{

View file

@ -1068,27 +1068,27 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
}
uch = (ch & 0x1f) << 6;
ADD_UTF_BYTE(0, )
ADD_UTF_BYTE(0,)
}
else if (ch < 0xf0)
{
uch = (ch & 0x0f) << 12;
ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, ))
ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,))
}
else if (ch < 0xf8)
{
uch = (ch & 0x07) << 18;
ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, )))
ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,)))
}
else if (ch < 0xfc)
{
uch = (ch & 0x03) << 24;
ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, ))))
ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,))))
}
else if (ch < 0xfe)
{
uch = (ch & 0x01) << 30;
ADD_UTF_BYTE(24, ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, )))))
ADD_UTF_BYTE(24, ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,)))))
}
else
uch = 0xfffd;
@ -1974,7 +1974,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
#else
cur.flags
#endif
);
);
continue;
}
@ -2243,7 +2243,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
#else
advancementImgd.flags
#endif
);
);
return NSZeroSize;
}
@ -2467,7 +2467,7 @@ dd-3*cc+3*bb-aa = (d-3*c+3*b-a)*n^3
aa= (d - 3c + 3b - a) m^3 + (3c - 6b + 3a) m^2 + (3b - 3a) m + a
bb= (( d - 3c + 3b - a) m^2 + (2c - 4b + 2a) m + b - a) n
bb= ((d - 3c + 3b - a) m^2 + (2c - 4b + 2a) m + b - a) n
+ aa
cc= ((d - 3c + 3b - a) m + c - 2b + a) n^2
@ -2498,10 +2498,10 @@ q(0.5) = 1/8*(a + 3*b + 3*c + d)
b+c=1/3*(a+4f+d)
p(1/4) = 1/64*
p(3/4) = 1/64*( 4e+24f+36g)
p(3/4) = 1/64*(4e+24f+36g)
q(1/4) = 1/64*
q(3/4) = 1/64*( a + 9b + 27c + 27d)
q(3/4) = 1/64*(a + 9b + 27c + 27d)
3b+c=1/3*(3a+8f+d)
@ -2516,7 +2516,7 @@ c=1/3*(2f+g)
q(t) = (1-t)^3*e + (1-t)^2*t*(e+2f) + (1-t)*t^2*(2f+g) + t^3*g =
((1-t)^3+(1-t)^2*t)*e + (1-t)^2*t*2f + (1-t)*t^2*2f + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2f*(t*(1-t)*( (1-t)+t)) + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2f*(t*(1-t)*((1-t)+t)) + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2*(1-t)*t*f + (t^3+(1-t)*t^2)*g =
(1-t)^2*e + 2*(1-t)*t*f + t^2*g
@ -3069,7 +3069,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[0][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[0][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[0][6] : 0)
) / 65536;
) / 65536;
j++;
v1 = (0 +
+ (j > 2 && j<sx + 3? src[j - 3] * filters[1][0] : 0)
@ -3079,7 +3079,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[1][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[1][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[1][6] : 0)
) / 65536;
) / 65536;
j++;
v2 = (0 +
+ (j > 2 && j<sx + 3? src[j - 3] * filters[2][0] : 0)
@ -3089,7 +3089,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[2][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[2][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[2][6] : 0)
) / 65536;
) / 65536;
j++;
scratch[i + mode] = v0>0?v0:0;

View file

@ -1013,27 +1013,27 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
}
uch = (ch & 0x1f) << 6;
ADD_UTF_BYTE(0, )
ADD_UTF_BYTE(0,)
}
else if (ch < 0xf0)
{
uch = (ch & 0x0f) << 12;
ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, ))
ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,))
}
else if (ch < 0xf8)
{
uch = (ch & 0x07) << 18;
ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, )))
ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,)))
}
else if (ch < 0xfc)
{
uch = (ch & 0x03) << 24;
ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, ))))
ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,))))
}
else if (ch < 0xfe)
{
uch = (ch & 0x01) << 30;
ADD_UTF_BYTE(24, ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0, )))))
ADD_UTF_BYTE(24, ADD_UTF_BYTE(18, ADD_UTF_BYTE(12, ADD_UTF_BYTE(6, ADD_UTF_BYTE(0,)))))
}
else
uch = 0xfffd;
@ -1794,7 +1794,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
NSLog(@"FTC_SBitCache_Lookup() failed with error %08x (%08x, %08x, %ix%i, %08x)\n",
error, glyph, imageType.face_id, imageType.width, imageType.height,
imageType.flags
);
);
continue;
}
@ -2063,7 +2063,7 @@ static FT_Error ft_get_face(FTC_FaceID fid, FT_Library lib, FT_Pointer data, FT_
error, glyph, imageType.face_id,
imageType.width, imageType.height,
imageType.flags
);
);
return NSZeroSize;
}
@ -2276,7 +2276,7 @@ dd-3*cc+3*bb-aa = (d-3*c+3*b-a)*n^3
aa= (d - 3c + 3b - a) m^3 + (3c - 6b + 3a) m^2 + (3b - 3a) m + a
bb= (( d - 3c + 3b - a) m^2 + (2c - 4b + 2a) m + b - a) n
bb= ((d - 3c + 3b - a) m^2 + (2c - 4b + 2a) m + b - a) n
+ aa
cc= ((d - 3c + 3b - a) m + c - 2b + a) n^2
@ -2307,10 +2307,10 @@ q(0.5) = 1/8*(a + 3*b + 3*c + d)
b+c=1/3*(a+4f+d)
p(1/4) = 1/64*
p(3/4) = 1/64*( 4e+24f+36g)
p(3/4) = 1/64*(4e+24f+36g)
q(1/4) = 1/64*
q(3/4) = 1/64*( a + 9b + 27c + 27d)
q(3/4) = 1/64*(a + 9b + 27c + 27d)
3b+c=1/3*(3a+8f+d)
@ -2325,7 +2325,7 @@ c=1/3*(2f+g)
q(t) = (1-t)^3*e + (1-t)^2*t*(e+2f) + (1-t)*t^2*(2f+g) + t^3*g =
((1-t)^3+(1-t)^2*t)*e + (1-t)^2*t*2f + (1-t)*t^2*2f + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2f*(t*(1-t)*( (1-t)+t)) + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2f*(t*(1-t)*((1-t)+t)) + (t^3+(1-t)*t^2)*g =
((1-t)^3+(1-t)^2*t)*e + 2*(1-t)*t*f + (t^3+(1-t)*t^2)*g =
(1-t)^2*e + 2*(1-t)*t*f + t^2*g
@ -2863,7 +2863,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[0][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[0][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[0][6] : 0)
) / 65536;
) / 65536;
j++;
v1 = (0 +
+ (j > 2 && j<sx + 3? src[j - 3] * filters[1][0] : 0)
@ -2873,7 +2873,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[1][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[1][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[1][6] : 0)
) / 65536;
) / 65536;
j++;
v2 = (0 +
+ (j > 2 && j<sx + 3? src[j - 3] * filters[2][0] : 0)
@ -2883,7 +2883,7 @@ static int filters[3][7]=
+ (j > -2 && j<sx - 1? src[j + 1] * filters[2][4] : 0)
+ (j > -3 && j<sx - 2? src[j + 2] * filters[2][5] : 0)
+ (j > -4 && j<sx - 3? src[j + 3] * filters[2][6] : 0)
) / 65536;
) / 65536;
j++;
scratch[i + mode] = v0>0?v0:0;

View file

@ -373,9 +373,9 @@ static void function_eval_in2_out3(function_t *f,double *a_in,double *out)
for (i=0;i<3;i++)
{
f->sample_cache[0][i]=function_getsample(f,sample[0] +(sample[1] )*f->size[0],i);
f->sample_cache[0][i]=function_getsample(f,sample[0] +(sample[1])*f->size[0],i);
if (sample[0]+1<f->size[0])
f->sample_cache[1][i]=function_getsample(f,sample[0]+1+(sample[1] )*f->size[0],i);
f->sample_cache[1][i]=function_getsample(f,sample[0]+1+(sample[1])*f->size[0],i);
if (sample[1]+1<f->size[1])
f->sample_cache[2][i]=function_getsample(f,sample[0] +(sample[1]+1)*f->size[0],i);
if (sample[0]+1<f->size[0] && sample[1]+1<f->size[1])

View file

@ -78,7 +78,7 @@ NSAffineTransform * WMCairoMatrixToNSAffine (cairo_matrix_t *cairo_mp)
- (id) copyWithZone: (NSZone *)zone
{
CairoType *aCT = (CairoType *)NSCopyObject(self, 0, zone);
NSLog (@":::FIXME::: %@ %s copy %0x to %0x",[self description], sel_get_name(_cmd), self, aCT );
NSLog (@":::FIXME::: %@ %s copy %0x to %0x",[self description], sel_get_name(_cmd), self, aCT);
aCT->_cr = cairo_create();
cairo_copy(aCT->_cr,_cr);
NSLog(@"cairo_copy %d to %d [%s]",_cr,aCT->_cr,cairo_status_string(_cr));
@ -261,7 +261,7 @@ NSMapTable * buffermap;
- (id) initWithWindowDevice: (gswindow_device_t *)device
{
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd) );
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd));
_gsdevice = device;
id oldbuffer = NSMapGet(buffermap, (const void*)(device->ident));
if (oldbuffer != nil)
@ -334,7 +334,7 @@ NSMapTable * buffermap;
- (void) dealloc
{
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd) );
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd));
if (_deviceid)
NSMapRemove(buffermap, _deviceid);
if (_pixmap)
@ -347,7 +347,7 @@ NSMapTable * buffermap;
@implementation CairoDevice
- (id) init
{
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd) );
NSLog (@":::FIXME::: %@ %s",[self description], sel_get_name(_cmd));
_ct = [[CairoType alloc] init];
return self;
@ -391,7 +391,7 @@ NSMapTable * buffermap;
- (id) copyWithZone: (NSZone *)zone
{
CairoDevice *aCD = (CairoDevice *)NSCopyObject(self, 0, zone);
NSLog (@":::FIXME::: %@ %s copy to %0x",[self description], sel_get_name(_cmd), aCD );
NSLog (@":::FIXME::: %@ %s copy to %0x",[self description], sel_get_name(_cmd), aCD);
aCD->_ct = [_ct copyWithZone:zone];
// aCD->_buffer = [_buffer copy];
RETAIN(_buffer);

View file

@ -147,7 +147,7 @@ static FTC_Manager ftc_manager;
error, glyph, advancementImgd.font.face_id,
advancementImgd.font.pix_width, advancementImgd.font.pix_height,
advancementImgd.flags
);
);
return NSZeroSize;
}

View file

@ -81,7 +81,7 @@ static cairo_matrix_t local_matrix;
cairo_get_target(_ct),
copy,
cairo_get_target(copy->_ct)
);
);
*/
RETAIN(_font);

View file

@ -63,23 +63,23 @@
#define CHECK_NULL_OUTPUT(outvar) \
do { if (outvar == NULL) {\
DPS_ERROR(DPSnulloutput, @"NULL output variable specified"); \
return; } } while(0)
return; } } while (0)
#define CHECK_INVALID_FONT(ident) \
do { if (ident >= [fontid count]) { \
DPS_ERROR(DPSinvalidfont, @"Cannot find indicated font"); \
return; } } while(0)
return; } } while (0)
#define CHECK_STACK_UNDERFLOW(stack) \
do { if (GSIArrayCount((GSIArray)stack) == 0) { \
DPS_ERROR(DPSstackunderflow, @"Attempt to pop from empty stack"); \
return; } } while(0)
return; } } while (0)
#if 0
#define CHECK_TYPECHECK(obj, kind) \
do { if ([kind class] != Nil && !GSObjCIsKindOf(GSObjCClass(obj), [kind class])) {\
DPS_ERROR(DPStypecheck, @"Invalid object"); \
return; } } while(0)
return; } } while (0)
#else
#define CHECK_TYPECHECK(obj,kind)
#endif
@ -414,7 +414,7 @@ static unsigned int unique_index = 0;
- (int) GSDefineGState
{
if(gstate == nil)
if (gstate == nil)
{
DPS_ERROR(DPSundefined, @"No gstate");
return 0;
@ -430,7 +430,7 @@ static unsigned int unique_index = 0;
- (void) GSReplaceGState: (int)gst
{
if(gst <= 0)
if (gst <= 0)
return;
NSMapInsert(gtable, (void *)gst, AUTORELEASE([gstate copy]));
}
@ -845,7 +845,7 @@ static unsigned int unique_index = 0;
- (void) GSWSetViewIsFlipped: (BOOL) flipped
{
if(gstate)
if (gstate)
gstate->viewIsFlipped = flipped;
}

View file

@ -863,16 +863,16 @@ static const char *hexdigits = "0123456789abcdef";
bytesPerRow, pixelsHigh, bytes);
return;
}
if(hasAlpha)
if (hasAlpha)
spp = samplesPerPixel - 1;
else
spp = samplesPerPixel;
if(samplesPerPixel > 1)
if (samplesPerPixel > 1)
{
if(isPlanar || hasAlpha)
if (isPlanar || hasAlpha)
{
if(bitsPerSample != 8)
if (bitsPerSample != 8)
{
NSLog(@"Image format conversion not supported for bps!=8");
return;
@ -894,7 +894,7 @@ static const char *hexdigits = "0123456789abcdef";
}
// The context is now waiting for data on its standard input
if(isPlanar || hasAlpha)
if (isPlanar || hasAlpha)
{
// We need to do a format conversion.
// We do this on the fly, sending data to the context as soon as

View file

@ -42,7 +42,7 @@
else
c=acount;
if(c==0)
if (c==0)
{
[output appendString:@"0 Events Que is empty\n"];
return output;

View file

@ -1598,7 +1598,7 @@ printf("\n\n##############################################################\n");
printf("handlesWindowDecorations %s\n",handlesWindowDecorations ? "YES" : "NO");
printf("checking for NSMiniaturizableWindowMask %u\n",(style & NSMiniaturizableWindowMask));
printf("GS Window Style %u\n",style);
printf("Extended Style %d [hex] %X\n",(int)estyle,(UINT)estyle );
printf("Extended Style %d [hex] %X\n",(int)estyle,(UINT)estyle);
printf("Win32 Style picked %ld [hex] %X\n",wstyle,(unsigned int)wstyle);
printf("\n##############################################################\n");
#endif

View file

@ -64,7 +64,7 @@
#ifdef __WM_ACTIVE__
BOOL target=NO;
if((int)lParam == flags.menuRef)
if ((int)lParam == flags.menuRef)
target=YES;
printf("RECEIVER [hwnd]%s\n",[[EVENT_WINDOW(hwnd) className] cString]);
@ -88,7 +88,7 @@
{
case TRUE:
{
if(active==YES)
if (active==YES)
{
if (flags._is_menu==YES) // have menu and app active
{
@ -97,7 +97,7 @@
else // Not a menu and app is active
{
// window is Visable
if([EVENT_WINDOW(hwnd) isVisible]==YES)
if ([EVENT_WINDOW(hwnd) isVisible]==YES)
{
// future implimentation if needed
}

View file

@ -202,7 +202,7 @@ typedef struct tagCREATESTRUCT {
[output appendFormat:@"Application window count is: %d\n",c];
for(i=0;i<c;i++)
for (i=0;i<c;i++)
{
NSWindow * theWindow=[anArray objectAtIndex:i];

View file

@ -48,10 +48,10 @@
data2: rect.origin.y];
if(hwnd==(HWND)flags.menuRef)
if (hwnd==(HWND)flags.menuRef)
{
//need native code here?
if(flags.HOLD_MENU_FOR_MOVE==FALSE)
if (flags.HOLD_MENU_FOR_MOVE==FALSE)
{
[EVENT_WINDOW(hwnd) sendEvent:ev];
}
@ -59,7 +59,7 @@
}
else
{
if(flags.HOLD_TRANSIENT_FOR_MOVE==FALSE)
if (flags.HOLD_TRANSIENT_FOR_MOVE==FALSE)
[EVENT_WINDOW(hwnd) sendEvent:ev];
}
@ -137,9 +137,9 @@
data1: rect.size.width
data2: rect.size.height];
if(hwnd==(HWND)flags.menuRef)
if (hwnd==(HWND)flags.menuRef)
{
if(flags.HOLD_MENU_FOR_SIZE==FALSE)
if (flags.HOLD_MENU_FOR_SIZE==FALSE)
{
[[NSApp mainMenu] setMenuChangedMessagesEnabled:YES];
[EVENT_WINDOW(hwnd) sendEvent:ev];
@ -174,9 +174,9 @@
data1: rect.size.width
data2: rect.size.height];
if(hwnd==(HWND)flags.menuRef)
if (hwnd==(HWND)flags.menuRef)
{
if(flags.HOLD_MENU_FOR_SIZE==FALSE)
if (flags.HOLD_MENU_FOR_SIZE==FALSE)
{
[EVENT_WINDOW(hwnd) _setVisible:YES];
[EVENT_WINDOW(hwnd) sendEvent:ev];
@ -233,7 +233,7 @@
RECT drect;
NSEvent *ev =nil;
if(wParam==TRUE)
if (wParam==TRUE)
{
// get first rect from NCCALCSIZE_PARAMS Structure
newRects=(NCCALCSIZE_PARAMS *)lParam;

View file

@ -169,7 +169,7 @@
[self initConfigWindow];
// if info does not exist add it and create a submenu for it
if([theMenu itemWithTitle:@"Info"] ==nil)
if ([theMenu itemWithTitle:@"Info"] ==nil)
{
anItem=[NSMenuItem new];
[anItem setTitle:@"Info"];
@ -303,7 +303,7 @@
// FIXME: Implement this in NSWindow first...
//[[aNotification object] setShowsResizeIndicator:NO];
// set window style
if ( [GSClass isEqual:@"NSMenuPanel"]==YES)
if ([GSClass isEqual:@"NSMenuPanel"]==YES)
{
GSStyle= [[aNotification object] styleMask];
//windowNum=[[aNotification object] windowNumber];

View file

@ -233,10 +233,10 @@ invalidateWindow(HWND hwnd, RECT rect)
HWND hWnd, // handle to window
CONST RECT* lpRect, // rectangle coordinates
BOOL bErase // erase state
);*/
);*/
//theHdc=BeginPaint(hwnd,lpPaint);
//if(flags.HOLD_PAINT_FOR_SIZING==FALSE)
//if (flags.HOLD_PAINT_FOR_SIZING==FALSE)
// {
if (GetUpdateRect(hwnd, &rect, NO))
{

View file

@ -225,7 +225,7 @@ RECT GSXWindowRectToMS(WIN32GState *s, NSRect r)
destRect.size = sourceRect.size;
destRect.origin = destPoint;
rectTo = GSViewRectToWin( self, destRect );
rectTo = GSViewRectToWin(self, destRect);
x = rectTo.left;
y = rectTo.top;
@ -234,19 +234,19 @@ RECT GSXWindowRectToMS(WIN32GState *s, NSRect r)
sourceDC = [source getHDC];
if( !sourceDC )
if (!sourceDC)
{
return;
}
if( self == source )
if (self == source)
{
hDC = sourceDC;
}
else
{
hDC = [self getHDC];
if( !hDC )
if (!hDC)
{
[source releaseHDC: sourceDC];
return;
@ -275,8 +275,8 @@ RECT GSXWindowRectToMS(WIN32GState *s, NSRect r)
}
default:
success = BitBlt( hDC, x, y, (rectFrom.right - rectFrom.left), h,
sourceDC, rectFrom.left, rectFrom.top, SRCCOPY );
success = BitBlt(hDC, x, y, (rectFrom.right - rectFrom.left), h,
sourceDC, rectFrom.left, rectFrom.top, SRCCOPY);
break;
}
@ -406,7 +406,7 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
bytesPerRow = (bitsPerPixel * pixelsWide) / 8;
// make sure its sane - also handles row padding if hint missing
while((bytesPerRow * 8) < (bitsPerPixel * pixelsWide))
while ((bytesPerRow * 8) < (bitsPerPixel * pixelsWide))
bytesPerRow++;
if (!(GetDeviceCaps(hDC, RASTERCAPS) & RC_DI_BITMAP))
@ -637,7 +637,7 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
BeginPath(hDC);
for(j = 0; j < count; j++)
for (j = 0; j < count; j++)
{
type = [path elementAtIndex: j associatedPoints: points];
switch(type)
@ -656,9 +656,9 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
POINT bp[3];
#if GDI_WIDELINE_BEZIERPATH_BUG
if(drawType == path_stroke && lineWidth > 1)
if (drawType == path_stroke && lineWidth > 1)
{
if(j != 0)
if (j != 0)
{
NSPoint movePoints[3];
@ -675,7 +675,7 @@ HBITMAP GSCreateBitmap(HDC hDC, int pixelsWide, int pixelsHigh,
}
PolyBezierTo(hDC, bp, 3);
#if GDI_WIDELINE_BEZIERPATH_BUG
if(drawType == path_stroke && lineWidth > 1)
if (drawType == path_stroke && lineWidth > 1)
MoveToEx(hDC, bp[2].x, bp[2].y, NULL);
#endif
}

View file

@ -67,7 +67,7 @@
win = [view window];
NSAssert(win, @"request of an X window attachment on a view that is not on a NSWindow");
if ( [view isRotatedOrScaledFromBase] )
if ([view isRotatedOrScaledFromBase])
[NSException raise: NSInvalidArgumentException
format: @"Cannot attach an Xwindow to a view that is rotated or scaled"];
@ -203,10 +203,10 @@ static XGGLContext *currentGLContext;
- (void) _detach
{
if( xsubwin )
if (xsubwin)
{
MAKE_DISPLAY(dpy);
if ( currentGLContext == self )
if (currentGLContext == self)
{
[XGGLContext clearCurrentContext];
}
@ -226,7 +226,7 @@ static XGGLContext *currentGLContext;
{
GLXContext other;
MAKE_DISPLAY(dpy);
if( context == nil || ![context isKindOfClass: [XGGLContext class]] )
if (context == nil || ![context isKindOfClass: [XGGLContext class]])
[NSException raise: NSInvalidArgumentException
format: @"%@ is an invalid context", context];
other = ((XGGLContext *)context)->glx_context;
@ -270,7 +270,7 @@ static XGGLContext *currentGLContext;
[super init];
glx_context = None;
if( _format && [_format isKindOfClass: [XGGLPixelFormat class]])
if (_format && [_format isKindOfClass: [XGGLPixelFormat class]])
{
MAKE_DISPLAY(dpy);
ASSIGN(format, (XGGLPixelFormat *)_format);
@ -298,7 +298,7 @@ static XGGLContext *currentGLContext;
NSDebugMLLog(@"GLX", @"deallocating");
[self _detach];
RELEASE(format);
if( glx_context != None )
if (glx_context != None)
{
MAKE_DISPLAY(dpy);
glXDestroyContext(dpy, glx_context);
@ -309,7 +309,7 @@ static XGGLContext *currentGLContext;
- (void) makeCurrentContext
{
MAKE_DISPLAY(dpy);
if( xsubwin == nil )
if (xsubwin == nil)
[NSException raise: NSGenericException
format: @"GL Context is not bind, cannot be made current"];
@ -369,7 +369,7 @@ static XGGLContext *currentGLContext;
{
XGXSubWindow *win;
MAKE_DISPLAY(dpy);
if( !view )
if (!view)
[NSException raise: NSInvalidArgumentException
format: @"setView called with a nil value"];
@ -391,7 +391,7 @@ static XGGLContext *currentGLContext;
// };
// conf_tab = glXChooseFBConfig(dpy, DefaultScreen(dpy), attrs, &n_elem);
// if ( n_elem > 0 )
// if (n_elem > 0)
// {
// printf("found %d context\n", n_elem);
// // win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy), 10, 10,
@ -422,7 +422,7 @@ static XGGLContext *currentGLContext;
- (NSView *)view
{
if(xsubwin)
if (xsubwin)
return xsubwin->attached;
else
return nil;

View file

@ -78,7 +78,7 @@
append1 (GLX_RGBA);
}
while(*ptr)
while (*ptr)
{
switch(*ptr)
{
@ -192,9 +192,9 @@
conf.visual = glXChooseVisual(dpy, DefaultScreen(dpy),
[data mutableBytes]);
if ( ((GSglxMinorVersion (dpy) >= 3)
if (((GSglxMinorVersion (dpy) >= 3)
? (void *)conf.tab : (void *)conf.visual)
== NULL )
== NULL)
{
NSDebugMLLog(@"GLX", @"no pixel format found matching what is required");
RELEASE(self);
@ -208,7 +208,7 @@
if (GSglxMinorVersion (dpy) >= 3)
{
int i;
for (i = 0; i < n_elem; ++i )
for (i = 0; i < n_elem; ++i)
{
int val;
NSDebugMLLog(@"GLX", @"inspecting %dth", i+1);

View file

@ -228,7 +228,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
autorelease];
[[NSNotificationCenter defaultCenter] addObserver: self
selector: @selector(activityOnFileHandle: )
selector: @selector(activityOnFileHandle:)
name: NSFileHandleDataAvailableNotification
object: fileDescriptor];
[fileDescriptor waitForDataInBackgroundAndNotifyForModes:
@ -414,7 +414,7 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
xEvent.xbutton.window = cWin->parent;
XUngrabPointer(dpy, CurrentTime);
XSendEvent(dpy, cWin->parent, True,
ButtonPressMask, &xEvent );
ButtonPressMask, &xEvent);
XFlush(dpy);
break;
}

View file

@ -2449,7 +2449,7 @@ static BOOL didCreatePixmaps;
gui_win = GSWindowWithNumber(win);
n = [window->exposedRects count];
if( n > 0 )
if (n > 0)
{
NSView *v;
NSValue *val[n];
@ -2458,7 +2458,7 @@ static BOOL didCreatePixmaps;
v = [gui_win contentView];
[window->exposedRects getObjects: val];
for( i = 0; i < n; ++i)
for (i = 0; i < n; ++i)
{
NSRect rect = [val[i] rectValue];
[v setNeedsDisplayInRect: rect];

View file

@ -66,10 +66,10 @@ static unsigned __NSHashCString(void *table, const void *aString)
register unsigned hash = 0, hash2;
register int i, n = strlen((char*)aString);
for(i=0; i < n; i++) {
for (i=0; i < n; i++) {
hash <<= 4;
hash += *p++;
if((hash2 = hash & 0xf0000000))
if ((hash2 = hash & 0xf0000000))
hash ^= (hash2 >> 24) ^ hash2;
}
return hash;
@ -460,7 +460,7 @@ afmEnumerator (char* resourceType, char* resourceName, char* resourceFile,
/* Check whether the font info is cached */
fontInfo = [globalFontInfoDictionary objectForKey: name];
if(fontInfo != nil)
if (fontInfo != nil)
{
RELEASE(self);
// retain to act like we were alloc'd
@ -496,7 +496,7 @@ afmEnumerator (char* resourceType, char* resourceName, char* resourceFile,
RELEASE(self);
/* Grab an unscaled font info and create a new scaled one. */
baseFontInfo = [[AFMFileFontInfo alloc] initUnscaledWithFontName: name];
if(baseFontInfo == nil)
if (baseFontInfo == nil)
{
return nil;
}

View file

@ -251,18 +251,18 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
{
NSDPSContext *ctxt = context_list, *previous=nil;
while(ctxt)
while (ctxt)
{
if(ctxt == self)
if (ctxt == self)
break;
previous = ctxt;
ctxt = ctxt->next_context;
}
if(!ctxt)
if (!ctxt)
NSLog(@"Internal Error: Couldn't find context to delete");
else
{
if(previous)
if (previous)
previous->next_context = next_context;
else
context_list = next_context;
@ -293,7 +293,7 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
{
NSDPSContext *ctxt;
ctxt = context_list;
while(ctxt)
while (ctxt)
{
[ctxt wait];
ctxt = ctxt->next_context;
@ -517,7 +517,7 @@ GNUstepErrorProc (DPSContext ctxt, DPSErrorCode errCode,
we find a version that works we can put an additional test here. For now,
just turn them off.
*/
ext_flags = (ext_flags & ~(COMPOSITE_EXT | ALPHAIMAGE_EXT | DISSOLVE_EXT ));
ext_flags = (ext_flags & ~(COMPOSITE_EXT | ALPHAIMAGE_EXT | DISSOLVE_EXT));
NSDebugLLog(@"NSDPSContext", @"Using DPS Revision: %d\n", dps_revision);
NSDebugLLog(@"NSDPSContext", @"DPS Default Matrix: [%f %f %f %f %f %f]\n",

View file

@ -1287,17 +1287,17 @@
}
// send the PostScript code
if(hasAlpha && working_alphaimage == YES)
if (hasAlpha && working_alphaimage == YES)
{
// FIXME
NSLog(@"Alphaimage not implemented");
return;
}
else if(samplesPerPixel > 1)
else if (samplesPerPixel > 1)
{
if(isPlanar || (hasAlpha && (working_alphaimage == NO)))
if (isPlanar || (hasAlpha && (working_alphaimage == NO)))
{
if(bitsPerSample != 8)
if (bitsPerSample != 8)
{
NSLog(@"Image format conversion not supported for bps!=8");
return;
@ -1311,7 +1311,7 @@
PSWImageHeader(pixelsWide, pixelsHigh, bitsPerSample);
// The context is now waiting for data on its standard input
if(isPlanar || (hasAlpha && (working_alphaimage == NO)))
if (isPlanar || (hasAlpha && (working_alphaimage == NO)))
{
// We need to do a format conversion.
// We do this on the fly, sending data to the context as soon as
@ -1319,27 +1319,27 @@
int i, j, spp, isAlpha, alpha;
unsigned char val;
isAlpha = hasAlpha && (working_alphaimage == NO);
if(isAlpha)
if (isAlpha)
spp = samplesPerPixel - 1;
else
spp = samplesPerPixel;
for(j=0; j<bytes; j++)
for (j=0; j<bytes; j++)
{
if(isAlpha)
if (isAlpha)
{
if(isPlanar)
if (isPlanar)
alpha = data[spp][j];
else
alpha = data[0][spp+j*samplesPerPixel];
}
for (i = 0; i < spp; i++)
{
if(isPlanar)
if (isPlanar)
val = data[i][j];
else
val = data[0][i+j*samplesPerPixel];
if(isAlpha)
if (isAlpha)
val = 255 - ((255-val)*(long)alpha)/255;
DPSWriteData(dps_context, &val, 1);
}

View file

@ -67,7 +67,7 @@
_amask = (1<<(aw)) -1; \
_ashift = (as); \
_awidth = (aw); \
} while(0)
} while (0)
#define PixelToRGB(pixel,r,g,b) \
@ -75,7 +75,7 @@
(r) = (pixel >> _rshift) & _rmask; \
(g) = (pixel >> _gshift) & _gmask; \
(b) = (pixel >> _bshift) & _bmask; \
} while(0)
} while (0)
/* Note that RGBToPixel assumes that the
r,g,b values are in the correct domain.
@ -87,7 +87,7 @@
pixel = ((r) << _rshift) \
|((g) << _gshift) \
|((b) << _bshift); \
} while(0)
} while (0)
#define CLAMP(a) \
do { \
@ -109,7 +109,7 @@
pixels[centry] = color.pixel; \
colors[centry] = color; \
} \
} while(0)
} while (0)
/* Composite source image (pixmap) onto a destination image with alpha.
Only works for op=Sover now
@ -248,7 +248,7 @@ _pixmap_combine_alpha(RContext *context,
unsigned row;
int cind;
for(cind = 0; cind < CSIZE; cind++)
for (cind = 0; cind < CSIZE; cind++)
{
empty[cind] = YES;
}
@ -418,7 +418,7 @@ _get_bit_value(unsigned char *base, long msb_off, int bit_width)
* being returned.
*/
value=base[byte2];
if(byte1!=byte2)
if (byte1!=byte2)
value|= base[byte1]<<8;
value >>= shift;
@ -438,12 +438,12 @@ _get_image_pixel(int col, unsigned char *r, unsigned char *g,
unsigned char *b, unsigned char *a,
unsigned char **planes, int *bit_off,
int spp, int bpp, int bps,
int pro_mul, int cspace, BOOL has_alpha, BOOL one_is_black )
int pro_mul, int cspace, BOOL has_alpha, BOOL one_is_black)
{
int p, values[5];
long off = col * bpp;
for(p = 0; p < spp; p++)
for (p = 0; p < spp; p++)
{
int raw_value = _get_bit_value(planes[p], off + bit_off[p], bps);
values[p] = raw_value * pro_mul;
@ -483,13 +483,13 @@ _get_image_pixel(int col, unsigned char *r, unsigned char *g,
static void
_create_image_row(struct _bitmap_decompose *img)
{
if(img->cur_screen_row >= img->screen_h)
if (img->cur_screen_row >= img->screen_h)
{
NSLog(@"Tried to create too many screen rows");
return;
}
if(img->is_direct_packed)
if (img->is_direct_packed)
/* do direct copy, only limited formats supported */
{
unsigned char *ptr = img->plane[0];
@ -503,18 +503,18 @@ _create_image_row(struct _bitmap_decompose *img)
int i, fc = img->first_vis_col, lc = img->last_vis_col;
/* do the offset from the right */
ptr += fc * ( (is_grey ? 1 : 3) + (ha ? 1 : 0) );
ptr += fc * ((is_grey ? 1 : 3) + (ha ? 1 : 0));
rptr += fc;
gptr += fc;
bptr += fc;
aptr += fc;
for(i = fc;i <= lc; i++)
for (i = fc;i <= lc; i++)
{
*rptr = *ptr++;
if(is_grey)
if (is_grey)
{
if(oib)
if (oib)
*rptr = 255 - *rptr;
*gptr = *bptr = *rptr;
}
@ -569,25 +569,25 @@ _create_image_row(struct _bitmap_decompose *img)
/* loop for each required row */
zero_count = YES;
for(tr = s_row; tr <= e_row; tr++)
for (tr = s_row; tr <= e_row; tr++)
{
/* move to the required image row */
while(img->cur_image_row < tr)
while (img->cur_image_row < tr)
{
int p;
for(p = 0; p < spp; p++)
for (p = 0; p < spp; p++)
plane[p] += bpr;
img->cur_image_row++;
}
/* for each screen pixel */
for(sc = fc; sc <= lc; sc++)
for (sc = fc; sc <= lc; sc++)
{
int s_col = col_starts[sc];
int e_col = col_ends[sc];
int tc;
if(zero_count)
if (zero_count)
{
r_sum[sc] = 0;
g_sum[sc] = 0;
@ -597,7 +597,7 @@ _create_image_row(struct _bitmap_decompose *img)
}
/* for each image pixel */
for(tc = s_col; tc <= e_col; tc++)
for (tc = s_col; tc <= e_col; tc++)
{
unsigned char r, g, b, a;
_get_image_pixel(tc, &r, &g, &b, &a,
@ -621,7 +621,7 @@ _create_image_row(struct _bitmap_decompose *img)
* one bit, thus giving us the nearest value and therefore a
* better approximation t the colour we hope.
*/
for(sc = fc; sc <= lc; sc++)
for (sc = fc; sc <= lc; sc++)
{
int count = pix_count[sc];
int half = count >> 1;
@ -656,26 +656,26 @@ _set_ranges(int src_len, int dst_len,
{
float dst_f = (float)dst_len;
int d;
if(fast_min || (src_len <= dst_len))
if (fast_min || (src_len <= dst_len))
/* magnifying */
{
float src_f = (float)src_len;
for(d = 0; d < dst_len; d++)
for (d = 0; d < dst_len; d++)
{
int middle = (int)((((float)d + 0.5) * src_f) / dst_f);
*start_ptr++ = middle;
*end_ptr++ = middle;
if(middle >= src_len)
if (middle >= src_len)
NSLog(@"Problem with magnification!");
}
}
else
{
int start = 0;
for(d = 0; d < dst_len; d++)
for (d = 0; d < dst_len; d++)
{
int end_i = (int)(0.5 + (((d+1) * src_len) / dst_f));
if((end_i > src_len) || (end_i < 1))
if ((end_i > src_len) || (end_i < 1))
NSLog(@"Problem with minification!");
*start_ptr++ = start;
*end_ptr++ = end_i - 1;
@ -721,7 +721,7 @@ _bitmap_combine_alpha(RContext *context,
NSLog(@"HSB colourspace not supported for images");
return -1;
case rgb_colorspace:
if(num_of_colours != 3)
if (num_of_colours != 3)
{
NSLog(@"Bad number of colour planes - %d", num_of_colours);
NSLog(@"RGB colourspace requires three planes excluding alpha");
@ -729,7 +729,7 @@ _bitmap_combine_alpha(RContext *context,
}
break;
case cmyk_colorspace:
if(num_of_colours != 4)
if (num_of_colours != 4)
{
NSLog(@"Bad number of colour planes - %d", num_of_colours);
NSLog(@"CMYK colourspace requires four planes excluding alpha");
@ -737,7 +737,7 @@ _bitmap_combine_alpha(RContext *context,
}
break;
case gray_colorspace:
if(num_of_colours != 1)
if (num_of_colours != 1)
{
NSLog(@"Bad number of colour planes - %d", num_of_colours);
NSLog(@"Gray colourspace requires one plane excluding alpha");
@ -816,18 +816,18 @@ _bitmap_combine_alpha(RContext *context,
int i;
/* zero them */
for(i=0;i<5;i++)
for (i=0;i<5;i++)
{
img.plane[i] = NULL;
img.bit_off[i] = 0;
}
/* set as appropriate */
if(is_planar)
for(i=0;i<img.spp;i++)
if (is_planar)
for (i=0;i<img.spp;i++)
img.plane[i] = data_planes[i];
else
for(i=0;i<img.spp;i++)
for (i=0;i<img.spp;i++)
{
img.plane[i] = data_planes[0];
img.bit_off[i] = i * img.bps;
@ -848,7 +848,7 @@ _bitmap_combine_alpha(RContext *context,
* floating point calculation.
*/
if(!is_planar && (img.screen_w == img.image_w)
if (!is_planar && (img.screen_w == img.image_w)
&& (img.screen_h == img.image_h) && (img.bps == 8)
&& ((img.cspace == gray_colorspace) || (img.cspace == rgb_colorspace))
&& ((img.bpr * 8) == (img.bps * img.spp * img.image_w)))
@ -877,12 +877,12 @@ _bitmap_combine_alpha(RContext *context,
}
/* skip the top rows if a shift is needed */
if(row_shift)
if (row_shift)
{
if(img.is_direct_packed) /* need to move data */
if (img.is_direct_packed) /* need to move data */
{
int i;
for(i=0;i<img.spp;i++)
for (i=0;i<img.spp;i++)
img.plane[i] += row_shift * img.bpr;
}
img.cur_screen_row = row_shift;
@ -1029,7 +1029,7 @@ _bitmap_combine_alpha(RContext *context,
BOOL empty[CSIZE];
int cind;
for(cind = 0; cind < CSIZE; cind++)
for (cind = 0; cind < CSIZE; cind++)
{
empty[cind] = YES;
}
@ -1159,7 +1159,7 @@ _bitmap_combine_alpha(RContext *context,
free(img.g);
free(img.b);
free(img.a);
if(!img.is_direct_packed)
if (!img.is_direct_packed)
{
free(img.row_starts);
free(img.row_ends);
@ -1265,7 +1265,7 @@ _pixmap_read_alpha(RContext *context,
BOOL empty[CSIZE];
int cind;
for(cind = 0; cind < CSIZE; cind++)
for (cind = 0; cind < CSIZE; cind++)
{
empty[cind] = YES;
}

View file

@ -247,7 +247,7 @@ NSFontTraitMask XGTraitsOfFont(Display *dpy, XFontStruct *info)
if (string != nil)
{
if (![string isEqualToString: @"iso8859"] &&
![string isEqualToString: @"iso10646"] )
![string isEqualToString: @"iso10646"])
mask |= NSNonStandardCharacterSetFontMask;
}
string = XGFontPropString(dpy, info, XA_CHARSET_ENCODING);

View file

@ -340,7 +340,7 @@ load_font_set(Display *dpy, const char *given_font_name,
xlfd_elms[11], // avg width
"*", // registry
"*" // encoding
);
);
}
else
{
@ -359,7 +359,7 @@ load_font_set(Display *dpy, const char *given_font_name,
xlfd_elms[10], // avg width
"*", // registry
"*" // encoding
);
);
}
// N.B. def_string is owned by the X server: Don't release it.
@ -438,20 +438,20 @@ glyphs2utf8(const NSGlyph* glyphs, int length, UTF8Str* ustr)
else if (*g < 0x00000800)
{
p[i++] = 0xc0 | ((*g >> 6) & 0x1f);
p[i++] = 0x80 | ( *g & 0x3f);
p[i++] = 0x80 | (*g & 0x3f);
}
else if (*g < 0x00010000)
{
p[i++] = 0xe0 | ((*g >> 12) & 0x0f);
p[i++] = 0x80 | ((*g >> 6) & 0x3f);
p[i++] = 0x80 | ( *g & 0x3f);
p[i++] = 0x80 | (*g & 0x3f);
}
else if (*g < 0x00200000)
{
p[i++] = 0xf0 | ((*g >> 18) & 0x07);
p[i++] = 0x80 | ((*g >> 12) & 0x3f);
p[i++] = 0x80 | ((*g >> 6) & 0x3f);
p[i++] = 0x80 | ( *g & 0x3f);
p[i++] = 0x80 | (*g & 0x3f);
}
else if (*g < 0x04000000)
{
@ -459,7 +459,7 @@ glyphs2utf8(const NSGlyph* glyphs, int length, UTF8Str* ustr)
p[i++] = 0x80 | ((*g >> 18) & 0x3f);
p[i++] = 0x80 | ((*g >> 12) & 0x3f);
p[i++] = 0x80 | ((*g >> 6) & 0x3f);
p[i++] = 0x80 | ( *g & 0x3f);
p[i++] = 0x80 | (*g & 0x3f);
}
else if (*g < 0x80000000)
{
@ -468,7 +468,7 @@ glyphs2utf8(const NSGlyph* glyphs, int length, UTF8Str* ustr)
p[i++] = 0x80 | ((*g >> 18) & 0x3f);
p[i++] = 0x80 | ((*g >> 12) & 0x3f);
p[i++] = 0x80 | ((*g >> 6) & 0x3f);
p[i++] = 0x80 | ( *g & 0x3f);
p[i++] = 0x80 | (*g & 0x3f);
}
else
{

View file

@ -117,7 +117,7 @@ static Region emptyRegion;
- (void) dealloc
{
if ( sharedGC == NO && xgcntxt )
if (sharedGC == NO && xgcntxt)
{
XFreeGC(XDPY, xgcntxt);
}
@ -979,7 +979,7 @@ static Region emptyRegion;
}
y0 = pts[i].y * 2;
y1 = p1.y * 2;
if ((y0 < yh && yh < y1) || (y1 < yh && yh < y0) )
if ((y0 < yh && yh < y1) || (y1 < yh && yh < y0))
{
int dy = yh - pts[i].y * 2;
int ldy = y1 - y0;
@ -1065,7 +1065,7 @@ static Region emptyRegion;
BOOL doit;
BOOL complex = NO;
for(j = 0; j < count; j++)
for (j = 0; j < count; j++)
{
doit = NO;
type = [flatPath elementAtIndex: j associatedPoints: points];
@ -1588,7 +1588,7 @@ static Region emptyRegion;
bytesPerRow = (bitsPerPixel * pixelsWide) / 8;
/* make sure its sane - also handles row padding if hint missing */
while((bytesPerRow * 8) < (bitsPerPixel * pixelsWide))
while ((bytesPerRow * 8) < (bitsPerPixel * pixelsWide))
bytesPerRow++;
/* get the colour space */
@ -1597,12 +1597,12 @@ static Region emptyRegion;
if ([colorSpaceName isEqualToString: NSDeviceRGBColorSpace] ||
[colorSpaceName isEqualToString: NSCalibratedRGBColorSpace])
cspace = rgb_colorspace;
else if([colorSpaceName isEqualToString: NSDeviceCMYKColorSpace])
else if ([colorSpaceName isEqualToString: NSDeviceCMYKColorSpace])
cspace = cmyk_colorspace;
else if([colorSpaceName isEqualToString: NSDeviceWhiteColorSpace] ||
else if ([colorSpaceName isEqualToString: NSDeviceWhiteColorSpace] ||
[colorSpaceName isEqualToString: NSCalibratedWhiteColorSpace])
cspace = gray_colorspace;
else if([colorSpaceName isEqualToString: NSDeviceBlackColorSpace] ||
else if ([colorSpaceName isEqualToString: NSDeviceBlackColorSpace] ||
[colorSpaceName isEqualToString: NSCalibratedBlackColorSpace])
{
cspace = gray_colorspace;
@ -1612,7 +1612,7 @@ static Region emptyRegion;
{
// if we dont recognise the name use RGB or greyscale as appropriate
NSLog(@"XGContext (DPSImage): Unknown colour space %@", colorSpaceName);
if(samplesPerPixel > 2)
if (samplesPerPixel > 2)
cspace = rgb_colorspace;
else
cspace = gray_colorspace;

View file

@ -422,7 +422,7 @@ static int fontDefSorter(NSArray *el1, NSArray *el2, void *context)
return NSOrderedDescending;
else if (w1 < w2)
return NSOrderedAscending;
else if(w2 < w1)
else if (w2 < w1)
return NSOrderedDescending;
return NSOrderedSame;

View file

@ -1168,7 +1168,7 @@ pasteboardTypeForMimeType(Display *xDisplay, NSZone *zone, Atom *typelist)
Atom *type = typelist;
NSMutableArray *newTypes = [[NSMutableArray allocWithZone: zone] init];
while(*type != None)
while (*type != None)
{
char *s = XGetAtomName(xDisplay, *type);