Hunk #1: Provide prototype to appease clang 15
Hunk #2: When decoding, the status display has Y2K problem.
Hunks #3 & #4: NUL vs NULL mismatch
Hunk #5: fix an infinite loop on unsigned char archs (powerpc and arm*)

Index: decode.c
--- decode.c.orig
+++ decode.c
@@ -35,6 +35,7 @@
 #define isleapyear(y)   (((y)%4 == 0 && (y)%100 != 0 || (y)%400 == 0))
 
 void hedprn();
+int readln2(FILE *ipath, char *buff, int maxlen);
 
 struct tm tm;
 time_t timep[2], seconds();
@@ -273,8 +274,8 @@ ish_head *head;
 	tm.tm_min = (p[1]&0x07)<<3;
 	tm.tm_min += p[0]>>5;
 	tm.tm_sec = (p[0]&0x1f)<<1;
-	fprintf(stderr,"%02d/%02d/%02d %02d:%02d:%02d ",
-	    tm.tm_year,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
+	fprintf(stderr,"%04d/%02d/%02d %02d:%02d:%02d ",
+	    tm.tm_year+1900,tm.tm_mon+1,tm.tm_mday,tm.tm_hour,tm.tm_min,tm.tm_sec);
 #ifdef __TURBOC__
 	memcpy( &timep[0], head->time, 4);
 	timep[1] = timep[0];
@@ -344,7 +345,7 @@ decish()
 		fprintf(stderr, "file name change '%s'", name);
 		strcpy(buff, name);
 		if((p = (unsigned char *)index(name, '.')) != NULL)
-		    *p = NULL;
+		    *p = '\0';
 		do {
 		    sprintf(buff, "%s.%03d", name, i++);
 		} while(access(buff,0) == 0);
@@ -665,7 +666,7 @@ char *buff;
 	    break;
     }
 
-    buff[i] = NULL;
+    buff[i] = '\0';
 
     return i;
 }
@@ -675,8 +676,7 @@ FILE    *ipath;
 int     maxlen;
 char    *buff;
 {
-    int     i,j;
-    char    c;
+    int     c,i,j;
 
     if((decok & 0x80) == 0)
         j=78;
