File hcode2.1-int-conversion.patch of Package hcode

Index: hcode2.1-mailpatch3/out.c
===================================================================
--- hcode2.1-mailpatch3.orig/out.c
+++ hcode2.1-mailpatch3/out.c
@@ -23,8 +23,8 @@ int outCode;
 {
 	static unsigned long int (*conv)();
 	static unsigned int MSB=0xff;
-        static unsigned char StartC=NULL, EndC=NULL;
-        static int initialized=0;
+  static unsigned char StartC, EndC;
+  static int initialized=0;
 
 	/* if ( prstat == PRNONE ) { */
 	if (   ! initialized     ) {
@@ -45,7 +45,7 @@ int outCode;
            		 
 
         if ( wc>>8 == 0 ) {
-                if (prstat==PRINTING && EndC!=NULL) putc(EndC,fpout);
+                if (prstat==PRINTING && EndC!='\0') putc(EndC,fpout);
                 if (prstat == PRINTING) prstat = PRINTED;
                 /* to make 'hcode -ki | hcode -ki' work: jshin(7/18/96) */
 		if ( wc == StartC && ! (outCode==IS||outCode==SD) )  
@@ -62,7 +62,7 @@ int outCode;
 
 	wc = (*conv)(wc);
 
-	if ( prstat == PRINTED && StartC != NULL )
+	if ( prstat == PRINTED && StartC != '\0' )
 		putc(StartC,fpout);
 
 	if ( wc>>16 == 0 ||  wc>>16 == 0x8ffb ) {	/* TR, KS */
@@ -87,7 +87,7 @@ int outCode;
 {
 	static int C;
         int ch,ju,jo;
-	static unsigned char StartC=NULL, EndC=NULL;
+	static unsigned char StartC, EndC;
 
         if ( prstat == PRNONE ) {
         	C=outCode-NB;
@@ -97,7 +97,7 @@ int outCode;
         }
 
         if ( wc>>8 == 0 ) {
-                if (prstat == PRINTING && EndC != NULL) putc(EndC,fpout);
+                if (prstat == PRINTING && EndC != '\0') putc(EndC,fpout);
 		if (prstat == PRINTING) prstat = PRINTED;
 		if ( wc == StartC ) putc((char)wc,fpout);
                 putc((char)wc,fpout);
Index: hcode2.1-mailpatch3/mail.c
===================================================================
--- hcode2.1-mailpatch3.orig/mail.c
+++ hcode2.1-mailpatch3/mail.c
@@ -165,7 +165,7 @@ void (*prwc)();
     unsigned char *iptr, *optr, *tptr;
     unsigned long int outwc;
 
-    char *charset[] = {"EUC-KR", "ISO-2022-KR", "KS_C_5601-1987", NULL};
+    char *charset[] = {"EUC-KR", "ISO-2022-KR", "KS_C_5601-1987", '\0'};
     char encode_prefix[20];
     int isbqheader;
 
@@ -252,15 +252,15 @@ int outCode;
             return;
         }
         ibuf[cp++] = '\n';
-        ibuf[cp] = NULL;
+        ibuf[cp] = '\0';
         cp = 0;
         iptr = ibuf;
         while (*iptr) {
             tptr = tbuf;
             while (*iptr && *iptr<0x80) fputc(*iptr++,fpout);
             while (*iptr && (*iptr>0x80 || *iptr ==' ')) *tptr++ = *iptr++;
-            *tptr = NULL;
-            if (tbuf[0]!=NULL) {
+            *tptr = '\0';
+            if (tbuf[0]!='\0') {
                 string_to_base64(obuf, tbuf);
                 fprintf(fpout,"=?EUC-KR?B?%s?=",obuf);
             }
@@ -348,7 +348,7 @@ void (*prwc)();
          if ( isspace(*iptr) || *iptr == '?' ) break;
          *tptr++ = *iptr++;
     }
-    *tptr = NULL;
+    *tptr = '\0';
     if (  ! strncmp("?=",iptr,2) ) {
         iptr+=2;
         if (  encoding == Bencode) 
openSUSE Build Service is sponsored by