1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00

Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code

This commit is contained in:
Jon Trulson 2012-09-18 10:07:11 -06:00
commit 3a9bac86e3
14 changed files with 73 additions and 70 deletions

View file

@ -1793,7 +1793,7 @@ RestoreSession(
xrm_name[0] = XrmStringToQuark ("dtterm");
xrm_name[1] = XrmStringToQuark ("numClonedTerms");
xrm_name[2] = NULL;
xrm_name[2] = 0;
XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value);
/* if we got nothing back, bail out... */
@ -1875,7 +1875,7 @@ RestoreTerm(
sprintf(buf, "dtterm_%d", termNum);
xrm_name[0] = XrmStringToQuark(buf);
xrm_name[2] = NULL;
xrm_name[2] = 0;
/* Pass 1, before widget realization...
*/
@ -2088,7 +2088,7 @@ SetWorkSpaceHints
do {
ptr = strchr (workspaces, ' ');
if (ptr != NULL)
*ptr = NULL;
*ptr = 0;
thisWsAtom = None;
/* if we haven't hit a match, try interning the atom... */

View file

@ -259,7 +259,7 @@ dttermNewHandler(
displayString = newDisplayString;
displayEnv = (char *)malloc(strlen("DISPLAY=") +
strlen(displayString) + 2);
displayEnv[0]=NULL;
displayEnv[0]=0;
strcat(displayEnv, "DISPLAY=");
strcat(displayEnv, displayString);
putenv(displayEnv);

View file

@ -33,6 +33,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <stdlib.h>
#ifndef SVR4
#if !defined( SYSV )
#include <sys/resource.h>

View file

@ -245,7 +245,7 @@ void makelist(ListData *ld)
existcode_num = 0;
for (i = 0; i < ld->allcode_num; i++) {
code = *allcodep;
pattern = FalReadFont(fid, code, NULL, NULL);
pattern = FalReadFont(fid, code, 0, 0);
if (fal_utyexists == 0) {
*existcodep = *allcodep;
existcodep++;
@ -294,7 +294,7 @@ char *i2s(int code)
for (i = 0; ; i++) {
if (tmp < 16) {
buf[i] = i2c(tmp);
buf[i+1] = NULL;
buf[i+1] = 0;
break;
}
buf[i] = i2c(tmp % 16);
@ -309,7 +309,7 @@ char *i2s(int code)
*cp = buf[i];
cp++;
}
*cp = NULL;
*cp = 0;
return (number);
}

View file

@ -181,7 +181,7 @@ extern char *bdftopcf;
#define SNFFONTC_ERROR -26
#define SCAN_TO_NONSP(p) {\
while (*(p) != NULL) {\
while (*(p) != 0) {\
if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
(p)++;\
} else {\
@ -191,7 +191,7 @@ extern char *bdftopcf;
}
#define SCAN_TO_SP(p) {\
while (*(p) != NULL) {\
while (*(p) != 0) {\
if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
break;\
} else {\

View file

@ -188,7 +188,7 @@
/*
* help message
*/
#define COMM_HELP_MSG{ \
#define COMM_HELP_MSG { \
USAGE(" [-codeset number] [-help]\n"); \
USAGE("\n"); \
}

View file

@ -687,7 +687,7 @@ int num;
FontScope scope;
ret = (ExtdSegment)Xmalloc(sizeof(ExtdSegmentRec));
if(ret == NULL){
return (NULL);
return (0);
}
if(strchr(value[0],':')){
ret->name = (char *)Xmalloc(strlen(value[0])+1);
@ -696,7 +696,7 @@ int num;
}
strcpy(ret->name,value[0]);
ptr = strchr(ret->name,':');
*ptr = NULL;
*ptr = 0;
ptr++;
if( !_fallcNCompareISOLatin1(ptr, "none", 4) ){
ret->side = XlcNONE ;
@ -939,7 +939,7 @@ load_generic(lcd)
char tmp[128];
tmpb = (codeset->byteM)[M-1].byteinfo ;
/* default 0x00 - 0xff */
sscanf(value[ii],"\\x%lx,\\x%lx",&start,&end);
sscanf(value[ii], "\\x%lx,\\x%lx", (long unsigned *) &start, (long unsigned *) &end);
tmpb[ii].start = (unsigned char)start;
tmpb[ii].end = (unsigned char)end;
}

View file

@ -172,7 +172,7 @@ long fb_default;
for(i = 0; i < NRUNE; i++)
table[i] = -1;
while((rv = fscanf(fptr, "%lx", &value)) != EOF) {
while((rv = fscanf(fptr, "%lx", (long unsigned *) &value)) != EOF) {
if(rv != 0 && value >= 0) {
table[value] = j++;
} else {
@ -532,11 +532,11 @@ long fb_default;
register int i = 0;
int j = 0;
int rv = 0;
long value;
long value;
for(i = 0; i < NRUNE; i++)
from_tbl[i] = -1;
while((rv = fscanf(fptr, "%lx", &value)) != EOF) {
while((rv = fscanf(fptr, "%lx", (long unsigned *) &value)) != EOF) {
if(rv != 0) {
(*to_tbl)[j++] = value;
} else {

View file

@ -608,7 +608,7 @@ static char
return NULL;
strcpy(pattern, font_name);
memset(fields, NULL, sizeof(char *) * 14);
memset(fields, 0, sizeof(char *) * 14);
ptr = pattern;
while(isspace(*ptr)) {
ptr++;
@ -644,7 +644,7 @@ static char
strcpy(str_point, "*");
fields[POINT_SIZE_FIELD - 1] = str_point;
rotate_font[0] = NULL;
rotate_font[0] = '\0';
for(field_num = 0 ; field_num < CHARSET_ENCODING_FIELD &&
fields[field_num] ; field_num++) {
sprintf(rotate_font, "%s-%s", rotate_font, fields[field_num]);

View file

@ -2369,7 +2369,7 @@ FalFontData *fdata;
if ((fp = open_fonts_list()) == NULL) {
return FAL_ERROR ;
}
memset( pname, NULL, sizeof( pname ) );
memset( pname, 0, sizeof( pname ) );
while ( fgets( buf, FAL_LINE_MAX, fp ) != ( char * ) NULL ) {
int eq;
@ -2523,7 +2523,7 @@ FalFontData *fdata;
fls->list = p_bak ;
}
memset( buf, NULL, sizeof(buf));
memset( buf, 0, sizeof(buf));
while( fgets( buf, FAL_LINE_MAX, fp ) != (char *)NULL ) {
int tmp_num, eq ;
@ -2535,7 +2535,7 @@ FalFontData *fdata;
/* parse string of font file */
if( (ep = strchr( buf, ' ' )) == (char *)NULL ) continue ;
else *ep = NULL ;
else *ep = 0 ;
/* refuse font file (not gpf) */
if(
( strcmp( FILE_SUFFIX(buf), PCFSUFFIX ) != 0 ) &&
@ -2563,7 +2563,7 @@ FalFontData *fdata;
case _FAL_TRY_NEXT :
if( (func & SRCHFNAME) || (func & FONTOFID) ) FreeString( fontFileName ) ;
fal_clear_data( &tmp_data );
memset( buf, NULL, sizeof(buf));
memset( buf, 0, sizeof(buf));
continue ;
case 0:
if( (func & FONTOFID) ) FreeString( fontFileName ) ;
@ -2577,7 +2577,7 @@ FalFontData *fdata;
if( !(func & FONTOFID) && (codeset_num == 0) ){
if( (func & SRCHFNAME) ) FreeString( fontFileName ) ;
fal_clear_data( &tmp_data );
memset( buf, NULL, sizeof(buf));
memset( buf, 0, sizeof(buf));
continue ;
}
@ -2639,7 +2639,7 @@ FalFontData *fdata;
if( fal_read_fidinf( fid, &fontid_inf ) != FAL_ERROR )
fdata->cd_set = fontid_inf.cd_set ;
else {
fdata->cd_set = NULL ;
fdata->cd_set = 0 ;
goto FalError ;
}
fclose(fp) ;
@ -3091,7 +3091,7 @@ unsigned int *glidx ;
/*
* get string of "CHARSET_REGISTRY"
*/
memset( &tmp_data, NULL, sizeof(FalFontData) ) ;
memset( &tmp_data, 0, sizeof(FalFontData) ) ;
if( cmpfid != fid ){
if( falReadGpfProp( FAL_READ_FONTINFO, finf, FAL_FONT_PRM, &tmp_data ) ) {
@ -3158,7 +3158,7 @@ unsigned int *code ;
/*
* get string of "CHARSET_REGISTRY"
*/
memset( &tmp_data, NULL, sizeof(tmp_data) ) ;
memset( &tmp_data, 0, sizeof(tmp_data) ) ;
if( falReadGpfProp( FAL_READ_FONTINFO, finf, FAL_FONT_PRM, &tmp_data ) ) {
fal_clear_data( &tmp_data ) ;
return FAL_ERROR;

View file

@ -98,7 +98,9 @@ pragma on(alloca);
#if defined(__GNUC__) || defined(__uxp__)
#if !defined(linux)
#define alloca ___builtin_alloca
#endif
#define ALLOCATE_LOCAL(size) alloca((int)(size))
#define DEALLOCATE_LOCAL(ptr) /* as nothing */
#else /* ! __GNUC__ ! __uxp__ */

View file

@ -44,10 +44,10 @@ void _falmbDefaultDrawImageString() { return ; }
/* Atom */ falInternAtom() { return 0 ; }
int _falwcGenericDrawString() { return 0 ; }
char **_falParseBaseFontNameList() { return NULL ; }
/* XFontStruct * */ falLoadQueryFont() { return NULL ; }
/* XFontStruct * */ falLoadQueryFont() { return 0 ; }
falFreeFont() { return 0 ; }
falFreeFontInfo() { return 0 ; }
/* char ** */ falListFonts() { return NULL ; }
/* char ** */ falListFonts() { return 0 ; }
void _falmbGenericDrawImageString() { return ; }
void _falwcDefaultDrawImageString() { return ; }
int _falmbDefaultDrawString() { return 0 ; }
@ -56,7 +56,7 @@ void falFreeStringList() { return ; }
/* falrmStringToQuark() { return 0 ; } */
/* falrmPermStringToQuark() { return 0 ; } */
int _falwcDefaultDrawString() { return 0 ; }
/* char * */ falGetAtomName() { return NULL ; }
/* char * */ falGetAtomName() { return 0 ; }
int _falwcGenericTextExtents() { return 0 ; }
int _falmbGenericTextExtents() { return 0 ; }
void _falwcGenericDrawImageString() { return ; }
@ -67,7 +67,7 @@ int _falwcDefaultTextExtents() { return 0 ; }
int _falmbDefaultTextEscapement() { return 0 ; }
int _falwcGenericTextEscapement() { return 0 ; }
int _falmbDefaultTextExtents() { return 0 ; }
/* char ** */ falListFontsWithInfo() { return NULL ; }
/* char ** */ falListFontsWithInfo() { return 0 ; }
int _falwcDefaultTextEscapement() { return 0 ; }
/* Status */ _falwcGenericTextPerCharExtents(){ return 0 ; }
/* _fallcMapOSLocaleName() { return 0 ; } */

View file

@ -627,12 +627,12 @@ int bsize;
}
}
ptn[bsize - 1] = NULL;
ptn[bsize - 1] = 0;
for (i=0, skip=0; i<head->bdf_height; i++) {
if (skip) {
for(j=0; j<mwidth; j++) {
ptn[j] = NULL;
ptn[j] = 0;
}
ptn += mwidth;
continue;
@ -645,7 +645,7 @@ int bsize;
if (!strncmp(p, ENDCHAR, ENDCHARsz)) {
skip = 1;
for(j=0; j<mwidth; j++) {
ptn[j] = NULL;
ptn[j] = 0;
}
ptn += mwidth;
continue;
@ -764,7 +764,7 @@ int bsize;
for (i=0, skip=0; i<head->p_height; i++) {
if (skip) {
for (j=0; j<mwidth; j++) {
ptn[j] = NULL;
ptn[j] = 0;
}
ptn += mwidth;
continue;
@ -778,7 +778,7 @@ int bsize;
(!strncmp(p, ENDDATA, ENDDATAsz))) {
skip = 1;
for (j=0; j<mwidth; j++) {
ptn[j] = NULL;
ptn[j] = 0;
}
ptn += mwidth;
continue;
@ -808,7 +808,7 @@ int width;
int i, iend, len;
char *p, str[3];
str[2] = NULL;
str[2] = 0;
SCAN_TO_NONSP(buf);
@ -829,7 +829,7 @@ int width;
}
if (iend%2) {
str[0] = *buf;
str[1] = NULL;
str[1] = 0;
*mem = (char)strtol(str, NULL, 16) << 4;
}
}
@ -857,11 +857,11 @@ int width;
for (i=0, skip=0; i<iend; i++) {
if (skip) {
*mem++ = NULL;
*mem++ = 0;
continue;
}
for (j=0, ptn = NULL; j<8; j++) {
if ((*buf == '\n') || (*buf == NULL)) {
for (j=0, ptn = 0; j<8; j++) {
if ((*buf == '\n') || (*buf == 0)) {
skip = 1;
ptn <<= (8-j);
break;
@ -1238,63 +1238,63 @@ char *prog_name ;
case 0:
break;
case BDF_OPEN_IN :
USAGE2("%s : The input font file cannot be opened.\"%s\"¡¥\n", prog_name, (snf_in != NULL)? snf_in : "\0" );
USAGE2("%s : The input font file cannot be opened.\"%s\"\A1\A5\n", prog_name, (snf_in != NULL)? snf_in : "\0" );
rtn = OPEN_FAIL ;
break;
case BDF_OPEN_OUT :
USAGE2("%s : The output font file cannot be opened.\"%s\"¡¥\n", prog_name, (snf_out != NULL)? snf_out : "\0" );
USAGE2("%s : The output font file cannot be opened.\"%s\"\A1\A5\n", prog_name, (snf_out != NULL)? snf_out : "\0" );
rtn = OPEN_FAIL ;
break;
case BDF_READ :
USAGE2("%s : Information from the font file cannot be extracted.\"%s\"¡¥ \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
USAGE2("%s : Information from the font file cannot be extracted.\"%s\"\A1\A5 \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
rtn = READ_FAIL ;
break;
case BDF_WRITE :
USAGE2("%s : It is not possible to write to the font file.\"%s\"¡¥\n", prog_name, (snf_out != NULL) ? snf_out : "\0" );
USAGE2("%s : It is not possible to write to the font file.\"%s\"\A1\A5\n", prog_name, (snf_out != NULL) ? snf_out : "\0" );
rtn = DEVICE_FAIL ;
break;
case BDF_INVAL :
USAGE2("%s : The format of the font file is illegal.\"%s\"¡¥ \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
USAGE2("%s : The format of the font file is illegal.\"%s\"\A1\A5 \n", prog_name, (snf_in != NULL) ? snf_in : "\0" );
rtn = 1 ;
break;
case BDF_OPEN_HEAD :
USAGE2("%s : The BDF file cannot be opened.\"%s\"¡¥\n", prog_name, (bdf_in != NULL)? bdf_in : "\0" );
USAGE2("%s : The BDF file cannot be opened.\"%s\"\A1\A5\n", prog_name, (bdf_in != NULL)? bdf_in : "\0" );
rtn = OPEN_FAIL ;
break;
case BDF_READ_HEAD :
USAGE2("%s : Information of the BDF file cannot be extracted.\"%s\"¡¥ \n", prog_name, (bdf_in != NULL) ? bdf_in : "\0" );
USAGE2("%s : Information of the BDF file cannot be extracted.\"%s\"\A1\A5 \n", prog_name, (bdf_in != NULL) ? bdf_in : "\0" );
rtn = READ_FAIL ;
break;
case GPF_OPEN_IN :
USAGE2("%s : The input character pattern file cannot be opened.\"%s\"¡¥\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
USAGE2("%s : The input character pattern file cannot be opened.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
rtn = OPEN_FAIL ;
break;
case GPF_OPEN_OUT :
USAGE2("%s : The output character pattern file cannot be opened.\"%s\"¡¥\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
USAGE2("%s : The output character pattern file cannot be opened.\"%s\"\A1\A5\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
rtn = OPEN_FAIL ;
break;
case GPF_READ :
USAGE2("%s : The character pattern file cannot be read.\"%s\"¡¥\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
USAGE2("%s : The character pattern file cannot be read.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
rtn = READ_FAIL ;
break;
case GPF_WRITE :
USAGE2("%s : It is not possible to write to the character pattern file.\"%s\"¡¥\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
USAGE2("%s : It is not possible to write to the character pattern file.\"%s\"\A1\A5\n", prog_name, (gpf_out != NULL) ? gpf_out : "\0" );
rtn = DEVICE_FAIL ;
break;
case GPF_INVAL :
USAGE2("%s : The format of the character pattern file is illegal.\"%s\"¡¥\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
USAGE2("%s : The format of the character pattern file is illegal.\"%s\"\A1\A5\n", prog_name, (gpf_in != NULL) ? gpf_in : "\0" );
rtn = 1 ;
break;
@ -1566,8 +1566,8 @@ char *com;
errno = 0;
if ( chown (fname, owner, group) != 0) {
USAGE2("%s : Failed in setteing of the owner and the group of the following files. \tPlease change to the file of the owner and the group of following ID \tafter the inquiry the system manager.\"%s\"\n", com, fname );
USAGE1("\t\t Owner ID ¡§%d\n", (int)owner);
USAGE1("\t\t Group ID ¡§%d\n", (int)group);
USAGE1("\t\t Owner ID \A1\A7%d\n", (int)owner);
USAGE1("\t\t Group ID \A1\A7%d\n", (int)group);
return( 1 );
}
return( 0 );
@ -1643,7 +1643,7 @@ char *cmd;
for ( ; end = ( char * )strchr( path, ':' ); path = end + 1 ) {
chr_sv = *end;
*end = NULL;
*end = 0;
AllocString( cmd_path, path, NULL ) ;
*end = chr_sv;

View file

@ -376,7 +376,7 @@ int buttons_cnt;
static Atom
DeleteWindowAtom()
{
static Atom delatom = NULL;
static Atom delatom = 0;
if (! delatom){
delatom = XInternAtom(XtDisplayOfObject(toplevel),
"WM_DELETE_WINDOW", False);
@ -532,7 +532,7 @@ int offset;
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, ref,
XmNleftOffset, offset,
0);
NULL);
}
void
@ -543,7 +543,7 @@ int offset;
XtVaSetValues( w,
XmNleftAttachment, XmATTACH_FORM,
XmNleftOffset, offset,
0);
NULL);
}
void
@ -556,7 +556,7 @@ int offset;
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, ref,
XmNtopOffset, offset,
0);
NULL);
}
void
@ -567,7 +567,7 @@ int offset;
XtVaSetValues( w,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, offset,
0);
NULL);
}
void
@ -580,7 +580,7 @@ int offset;
XmNrightAttachment, XmATTACH_WIDGET,
XmNrightWidget, ref,
XmNrightOffset, offset,
0);
NULL);
}
void
@ -591,7 +591,7 @@ int offset;
XtVaSetValues( w,
XmNrightAttachment, XmATTACH_FORM,
XmNrightOffset, offset,
0);
NULL);
}
void
@ -602,7 +602,7 @@ int offset;
XtVaSetValues( w,
XmNbottomAttachment, XmATTACH_FORM,
XmNbottomOffset, offset,
0);
NULL);
}
#endif /* not USE_MACRO */
@ -641,7 +641,7 @@ String str;
{
XmString cs;
cs = XmStringCreateLocalized(str);
XtVaSetValues( w, XmNlabelString, cs, 0);
XtVaSetValues( w, XmNlabelString, cs, NULL);
XmStringFree( cs );
}
@ -652,7 +652,7 @@ String str;
{
XmString cs;
cs = XmStringCreateLocalized(str);
XtVaSetValues( w, XmNlabelString, cs, 0);
XtVaSetValues( w, XmNlabelString, cs, NULL);
XmStringFree( cs );
XmUpdateDisplay(w);
}
@ -680,7 +680,7 @@ char *str;
if (! str || ! *str) return;
for( p=str, s=buf, lw=0; *p != NULL; ){
for( p=str, s=buf, lw=0; *p != 0; ){
if ( (*p == '\n') || (charcnt <= lw) ){
*s = '\n'; /* new line */
@ -692,7 +692,7 @@ char *str;
lw += wcwidth( wc );
}
*s = NULL;
*s = 0;
cs = XmStringCreateLocalized(buf);
XtVaSetValues(st, XmNlabelString, (XtArgVal)cs, (String)0 );
@ -808,13 +808,13 @@ XtPointer clientdata;
Dimension bbw, mw, sw, cw;
XtVaGetValues(w, XmNchildren, &child, XmNnumChildren, &num, 0);
XtVaGetValues(w, XmNchildren, &child, XmNnumChildren, &num, NULL);
XtVaGetValues(XtParent(w),
XmNwidth, &bbw,
XmNmarginWidth, &mw,
XmNshadowThickness, &sw,
0);
XtVaGetValues(child[0], XmNwidth, &cw, 0);
NULL);
XtVaGetValues(child[0], XmNwidth, &cw, NULL);
XtVaSetValues(w, XmNwidth, ((int)bbw-2*((int)mw+(int)sw)), NULL);
XtVaSetValues(child[0], XmNx,
((((int)bbw-2*((int)mw+(int)sw))-(int)cw)/2), NULL);