@@ -91,7 +91,7 @@ static void cbm_Size(double *left, double *right,
9191# include "bitmap.h"
9292#endif
9393
94- static Rboolean
94+ static bool
9595BM_Open (pDevDesc dd , pX11Desc xd , int width , int height )
9696{
9797 char buf [R_PATH_MAX ];
@@ -127,15 +127,15 @@ BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
127127 if (res != CAIRO_STATUS_SUCCESS ) {
128128 xd -> cs = NULL ;
129129 warning ("cairo error '%s'" , cairo_status_to_string (res ));
130- return FALSE ;
130+ return false ;
131131 }
132132 if (xd -> onefile )
133133 cairo_svg_surface_restrict_to_version (xd -> cs , CAIRO_SVG_VERSION_1_2 );
134134 xd -> cc = cairo_create (xd -> cs );
135135 res = cairo_status (xd -> cc );
136136 if (res != CAIRO_STATUS_SUCCESS ) {
137137 warning ("cairo error '%s'" , cairo_status_to_string (res ));
138- return FALSE ;
138+ return false ;
139139 }
140140 cairo_set_antialias (xd -> cc , xd -> antialias );
141141 }
@@ -149,15 +149,15 @@ BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
149149 res = cairo_surface_status (xd -> cs );
150150 if (res != CAIRO_STATUS_SUCCESS ) {
151151 warning ("cairo error '%s'" , cairo_status_to_string (res ));
152- return FALSE ;
152+ return false ;
153153 }
154154 cairo_surface_set_fallback_resolution (xd -> cs , xd -> fallback_dpi ,
155155 xd -> fallback_dpi );
156156 xd -> cc = cairo_create (xd -> cs );
157157 res = cairo_status (xd -> cc );
158158 if (res != CAIRO_STATUS_SUCCESS ) {
159159 warning ("cairo error '%s'" , cairo_status_to_string (res ));
160- return FALSE ;
160+ return false ;
161161 }
162162 cairo_set_antialias (xd -> cc , xd -> antialias );
163163 }
@@ -171,7 +171,7 @@ BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
171171 res = cairo_surface_status (xd -> cs );
172172 if (res != CAIRO_STATUS_SUCCESS ) {
173173 warning ("cairo error '%s'" , cairo_status_to_string (res ));
174- return FALSE ;
174+ return false ;
175175 }
176176// We already require >= 1.2
177177#if CAIRO_VERSION_MAJOR > 2 || CAIRO_VERSION_MINOR >= 6
@@ -184,7 +184,7 @@ BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
184184 res = cairo_status (xd -> cc );
185185 if (res != CAIRO_STATUS_SUCCESS ) {
186186 warning ("cairo error '%s'" , cairo_status_to_string (res ));
187- return FALSE ;
187+ return false ;
188188 }
189189 cairo_set_antialias (xd -> cc , xd -> antialias );
190190 }
@@ -198,7 +198,7 @@ BM_Open(pDevDesc dd, pX11Desc xd, int width, int height)
198198 CairoInitGroups (xd );
199199 xd -> appending = 0 ;
200200
201- return TRUE ;
201+ return true ;
202202}
203203
204204
@@ -397,18 +397,18 @@ static void BM_Close(pDevDesc dd)
397397
398398
399399
400- static Rboolean
400+ static bool
401401BMDeviceDriver (pDevDesc dd , int kind , SEXP filename ,
402402 int quality , int width , int height , int ps ,
403403 int bg , int res , int antialias , const char * family ,
404- double dpi , const char * symbolfamily , Rboolean usePUA )
404+ double dpi , const char * symbolfamily , bool usePUA )
405405{
406406 pX11Desc xd ;
407407 int res0 = (res > 0 ) ? res : 72 ;
408408 double dps = ps ;
409409
410410 /* allocate new device description */
411- if (!(xd = (pX11Desc ) calloc (1 , sizeof (X11Desc )))) return FALSE ;
411+ if (!(xd = (pX11Desc ) calloc (1 , sizeof (X11Desc )))) return false ;
412412 strncpy (xd -> filename , R_ExpandFileName (translateCharFP (filename )),
413413 R_PATH_MAX - 1 );
414414 xd -> filename [R_PATH_MAX - 1 ] = '\0' ;
@@ -463,7 +463,7 @@ BMDeviceDriver(pDevDesc dd, int kind, SEXP filename,
463463
464464 if (!BM_Open (dd , xd , width , height )) {
465465 free (xd );
466- return FALSE ;
466+ return false ;
467467 }
468468 if (xd -> type == SVG || xd -> type == PDF || xd -> type == PS )
469469 xd -> onefile = quality != 0 ;
@@ -557,7 +557,7 @@ BMDeviceDriver(pDevDesc dd, int kind, SEXP filename,
557557
558558 dd -> deviceSpecific = (void * ) xd ;
559559
560- return TRUE ;
560+ return true ;
561561}
562562
563563const static struct {
@@ -585,7 +585,7 @@ SEXP in_Cairo(SEXP args)
585585 pGEDevDesc gdd ;
586586 SEXP sc ;
587587 const char * family , * symbolfamily ;
588- Rboolean usePUA ;
588+ bool usePUA ;
589589 int type , quality , width , height , pointsize , bgcolor , res , antialias ;
590590 double dpi ;
591591 SEXP filename ;
@@ -646,7 +646,7 @@ SEXP in_Cairo(SEXP args)
646646 error (_ ("invalid '%s' argument" ), "symbolfamily" );
647647 symbolfamily = translateChar (STRING_ELT (CAR (args ), 0 ));
648648 /* scsymbol forced to have "usePUA" attribute in R code */
649- usePUA = asRboolean (getAttrib (CAR (args ), install ("usePUA" )));
649+ usePUA = asBool (getAttrib (CAR (args ), install ("usePUA" )));
650650
651651 R_GE_checkVersionOrDie (R_GE_version );
652652 R_CheckDeviceAvailable ();
0 commit comments