Avoid "bool" variable name
C23 has a type of that name.
This commit is contained in:
@@ -110,7 +110,7 @@ myDtChkpntMsgSend(char *message, char *type)
|
|||||||
struct timezone time_zone;
|
struct timezone time_zone;
|
||||||
XTextProperty tp;
|
XTextProperty tp;
|
||||||
Status status;
|
Status status;
|
||||||
Bool bool;
|
Bool hasEvent;
|
||||||
XEvent event;
|
XEvent event;
|
||||||
|
|
||||||
/* Check to see if checkpoint is actually on */
|
/* Check to see if checkpoint is actually on */
|
||||||
@@ -153,9 +153,9 @@ myDtChkpntMsgSend(char *message, char *type)
|
|||||||
timestamp = oldtime;
|
timestamp = oldtime;
|
||||||
}
|
}
|
||||||
else { /* Check event queue */
|
else { /* Check event queue */
|
||||||
bool = XCheckIfEvent(dtcp_info.display, &event,
|
hasEvent = XCheckIfEvent(dtcp_info.display, &event,
|
||||||
myCheckClientEvent, NULL);
|
myCheckClientEvent, NULL);
|
||||||
if (bool == True) {
|
if (hasEvent == True) {
|
||||||
if (event.type == PropertyNotify)
|
if (event.type == PropertyNotify)
|
||||||
timestamp = event.xproperty.time;
|
timestamp = event.xproperty.time;
|
||||||
else timestamp = event.xselection.time;
|
else timestamp = event.xselection.time;
|
||||||
@@ -190,12 +190,12 @@ myDtChkpntMsgSend(char *message, char *type)
|
|||||||
*/
|
*/
|
||||||
oldtime = INVALID_TIME;
|
oldtime = INVALID_TIME;
|
||||||
do {
|
do {
|
||||||
bool = XCheckIfEvent(dtcp_info.display, &event,
|
hasEvent = XCheckIfEvent(dtcp_info.display, &event,
|
||||||
myCheckClientEvent, NULL);
|
myCheckClientEvent, NULL);
|
||||||
if (event.type == PropertyNotify) /* Save timestamp for recycling */
|
if (event.type == PropertyNotify) /* Save timestamp for recycling */
|
||||||
oldtime = event.xproperty.time;
|
oldtime = event.xproperty.time;
|
||||||
else oldtime = event.xselection.time;
|
else oldtime = event.xselection.time;
|
||||||
} while(bool == True);
|
} while(hasEvent == True);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Increment the property and message counters
|
* Increment the property and message counters
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ static Bool myCheckSelectionEvent(Display *display, XEvent *event, char *args)
|
|||||||
Bool _DtPerfChkpntMsgReceive(DtChkpntMsg *dtcp_msg, Bool bBlock)
|
Bool _DtPerfChkpntMsgReceive(DtChkpntMsg *dtcp_msg, Bool bBlock)
|
||||||
{
|
{
|
||||||
XEvent event;
|
XEvent event;
|
||||||
Bool bool=True;
|
Bool hasEvent=True;
|
||||||
XTextProperty tp;
|
XTextProperty tp;
|
||||||
int i;
|
int i;
|
||||||
static char **Stringlist;
|
static char **Stringlist;
|
||||||
@@ -178,10 +178,10 @@ Bool _DtPerfChkpntMsgReceive(DtChkpntMsg *dtcp_msg, Bool bBlock)
|
|||||||
if (bBlock == True)
|
if (bBlock == True)
|
||||||
XIfEvent(dtsvc_info.display, &event, myCheckSelectionEvent, NULL);
|
XIfEvent(dtsvc_info.display, &event, myCheckSelectionEvent, NULL);
|
||||||
else
|
else
|
||||||
bool = XCheckIfEvent(dtsvc_info.display, &event,
|
hasEvent = XCheckIfEvent(dtsvc_info.display, &event,
|
||||||
myCheckSelectionEvent, NULL);
|
myCheckSelectionEvent, NULL);
|
||||||
|
|
||||||
if (bool == True) {
|
if (hasEvent == True) {
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case SelectionRequest: /* Message received from a client */
|
case SelectionRequest: /* Message received from a client */
|
||||||
/* Is this a Checkpoint request ?*/
|
/* Is this a Checkpoint request ?*/
|
||||||
@@ -213,10 +213,10 @@ Bool _DtPerfChkpntMsgReceive(DtChkpntMsg *dtcp_msg, Bool bBlock)
|
|||||||
case SelectionClear: /* We no longer own the selection */
|
case SelectionClear: /* We no longer own the selection */
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,"\t** Chkpnt listener: Warning - loss of Selection ownership **\n");
|
fprintf(stderr,"\t** Chkpnt listener: Warning - loss of Selection ownership **\n");
|
||||||
bool = False;
|
hasEvent = False;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_DtSvcProcessUnlock();
|
_DtSvcProcessUnlock();
|
||||||
return(bool);
|
return(hasEvent);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -591,7 +591,7 @@ assert(int p)
|
|||||||
return(p);
|
return(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {caddr_t max; int i; boolean_t bool;} Rec;
|
typedef struct {caddr_t max; int i; boolean_t b;} Rec;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
||||||
@@ -602,14 +602,14 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
|||||||
if (x == z) {
|
if (x == z) {
|
||||||
rec->max = max;
|
rec->max = max;
|
||||||
rec->i = 0;
|
rec->i = 0;
|
||||||
rec->bool = B_FALSE;
|
rec->b = B_FALSE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
check1(x->llink, max, z, localp, private);
|
check1(x->llink, max, z, localp, private);
|
||||||
if (private->status == rb_badtable) return;
|
if (private->status == rb_badtable) return;
|
||||||
max = localp->max;
|
max = localp->max;
|
||||||
dl = localp->i;
|
dl = localp->i;
|
||||||
redchild = localp->bool;
|
redchild = localp->b;
|
||||||
if (!assert (!(redchild && (x->color == red)))) {
|
if (!assert (!(redchild && (x->color == red)))) {
|
||||||
private->status = rb_badtable;
|
private->status = rb_badtable;
|
||||||
return;
|
return;
|
||||||
@@ -624,7 +624,7 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
|||||||
if (private->status == rb_badtable) return;
|
if (private->status == rb_badtable) return;
|
||||||
max = localp->max;
|
max = localp->max;
|
||||||
dr = localp->i;
|
dr = localp->i;
|
||||||
redchild = localp->bool;
|
redchild = localp->b;
|
||||||
if (!assert (!(redchild && (x->color == red)))) {
|
if (!assert (!(redchild && (x->color == red)))) {
|
||||||
private->status = rb_badtable;
|
private->status = rb_badtable;
|
||||||
return;
|
return;
|
||||||
@@ -635,7 +635,7 @@ check1(Tree_node *x, caddr_t max, Tree_node *z, Rec *rec, Private *private)
|
|||||||
}
|
}
|
||||||
rec->max = max;
|
rec->max = max;
|
||||||
rec->i = dl + ((x->color == black) ? 1 : 0);
|
rec->i = dl + ((x->color == black) ? 1 : 0);
|
||||||
rec->bool = ((x->color == red) ? B_TRUE : B_FALSE);
|
rec->b = ((x->color == red) ? B_TRUE : B_FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <stdbool.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@@ -172,8 +173,6 @@
|
|||||||
#define ACTION_MASK 0xf0
|
#define ACTION_MASK 0xf0
|
||||||
|
|
||||||
|
|
||||||
typedef short bool;
|
|
||||||
|
|
||||||
/* operation states */
|
/* operation states */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
State_None = 0,
|
State_None = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user