#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
+#include <stdlib.h>
#ifndef SVR4
#if !defined( SYSV )
#include <sys/resource.h>
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++;
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);
*cp = buf[i];
cp++;
}
- *cp = NULL;
+ *cp = 0;
return (number);
}
#define SNFFONTC_ERROR -26
#define SCAN_TO_NONSP(p) {\
- while (*(p) != NULL) {\
+ while (*(p) != 0) {\
if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
(p)++;\
} else {\
}
#define SCAN_TO_SP(p) {\
- while (*(p) != NULL) {\
+ while (*(p) != 0) {\
if ((*(p) == ' ') || (*(p) == TAB_CD) || (*(p) == 0xa1)) {\
break;\
} else {\
/*
* help message
*/
-#define COMM_HELP_MSG{ \
+#define COMM_HELP_MSG { \
USAGE(" [-codeset number] [-help]\n"); \
USAGE("\n"); \
}
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);
}
strcpy(ret->name,value[0]);
ptr = strchr(ret->name,':');
- *ptr = NULL;
+ *ptr = 0;
ptr++;
if( !_fallcNCompareISOLatin1(ptr, "none", 4) ){
ret->side = XlcNONE ;
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;
}
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 {
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 {
return NULL;
strcpy(pattern, font_name);
- memset(fields, NULL, sizeof(char *) * 14);
+ memset(fields, 0, sizeof(char *) * 14);
ptr = pattern;
while(isspace(*ptr)) {
ptr++;
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]);
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;
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 ;
/* 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 ) &&
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 ) ;
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 ;
}
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) ;
/*
* 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 ) ) {
/*
* 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;
#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__ */
/* 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 ; }
/* 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 ; }
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 ; } */
}
}
- 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;
if (!strncmp(p, ENDCHAR, ENDCHARsz)) {
skip = 1;
for(j=0; j<mwidth; j++) {
- ptn[j] = NULL;
+ ptn[j] = 0;
}
ptn += mwidth;
continue;
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;
(!strncmp(p, ENDDATA, ENDDATAsz))) {
skip = 1;
for (j=0; j<mwidth; j++) {
- ptn[j] = NULL;
+ ptn[j] = 0;
}
ptn += mwidth;
continue;
int i, iend, len;
char *p, str[3];
- str[2] = NULL;
+ str[2] = 0;
SCAN_TO_NONSP(buf);
}
if (iend%2) {
str[0] = *buf;
- str[1] = NULL;
+ str[1] = 0;
*mem = (char)strtol(str, NULL, 16) << 4;
}
}
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;
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;
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 );
for ( ; end = ( char * )strchr( path, ':' ); path = end + 1 ) {
chr_sv = *end;
- *end = NULL;
+ *end = 0;
AllocString( cmd_path, path, NULL ) ;
*end = chr_sv;
static Atom
DeleteWindowAtom()
{
- static Atom delatom = NULL;
+ static Atom delatom = 0;
if (! delatom){
delatom = XInternAtom(XtDisplayOfObject(toplevel),
"WM_DELETE_WINDOW", False);
XmNleftAttachment, XmATTACH_WIDGET,
XmNleftWidget, ref,
XmNleftOffset, offset,
- 0);
+ NULL);
}
void
XtVaSetValues( w,
XmNleftAttachment, XmATTACH_FORM,
XmNleftOffset, offset,
- 0);
+ NULL);
}
void
XmNtopAttachment, XmATTACH_WIDGET,
XmNtopWidget, ref,
XmNtopOffset, offset,
- 0);
+ NULL);
}
void
XtVaSetValues( w,
XmNtopAttachment, XmATTACH_FORM,
XmNtopOffset, offset,
- 0);
+ NULL);
}
void
XmNrightAttachment, XmATTACH_WIDGET,
XmNrightWidget, ref,
XmNrightOffset, offset,
- 0);
+ NULL);
}
void
XtVaSetValues( w,
XmNrightAttachment, XmATTACH_FORM,
XmNrightOffset, offset,
- 0);
+ NULL);
}
void
XtVaSetValues( w,
XmNbottomAttachment, XmATTACH_FORM,
XmNbottomOffset, offset,
- 0);
+ NULL);
}
#endif /* not USE_MACRO */
{
XmString cs;
cs = XmStringCreateLocalized(str);
- XtVaSetValues( w, XmNlabelString, cs, 0);
+ XtVaSetValues( w, XmNlabelString, cs, NULL);
XmStringFree( cs );
}
{
XmString cs;
cs = XmStringCreateLocalized(str);
- XtVaSetValues( w, XmNlabelString, cs, 0);
+ XtVaSetValues( w, XmNlabelString, cs, NULL);
XmStringFree( cs );
XmUpdateDisplay(w);
}
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 */
lw += wcwidth( wc );
}
- *s = NULL;
+ *s = 0;
cs = XmStringCreateLocalized(buf);
XtVaSetValues(st, XmNlabelString, (XtArgVal)cs, (String)0 );
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);