Description: remove deprecated register keyword
 ISO C++17 does not allow ‘register’ storage class specifier
Author: Christian T. Steigies <cts@debian.org>
Last-Update: 2023-01-04
Index: gle-graphics/src/gle/bitmap/lzwencode.cpp
===================================================================
--- gle-graphics.orig/src/gle/bitmap/lzwencode.cpp
+++ gle-graphics/src/gle/bitmap/lzwencode.cpp
@@ -125,8 +125,8 @@ typedef struct {
 } encodeState;
 
 static void GLELZWEncoderClearHash(encodeState* sp) {
-	register hash_t *hp = &sp->enc_hashtab[HSIZE-1];
-	register long i = HSIZE-8;
+	hash_t *hp = &sp->enc_hashtab[HSIZE-1];
+	long i = HSIZE-8;
  	do {
 		i -= 8;
 		hp[-7].hash = -1;
@@ -208,10 +208,10 @@ int GLELZWByteStream::preEncode() {
  * for the decoder.
  */
 int GLELZWByteStream::encode(GLEBYTE* bp, GLEDWORD cc) {
-	register encodeState *sp = (encodeState*)m_Data;
-	register long fcode;
-	register hash_t *hp;
-	register int h, c;
+	encodeState *sp = (encodeState*)m_Data;
+	long fcode;
+	hash_t *hp;
+	int h, c;
 	hcode_t ent;
 	long disp;
 	long incount, outcount, checkpoint;
@@ -362,7 +362,7 @@ int GLELZWByteStream::encode(GLEBYTE* bp
  * string and tacking on an End Of Information code.
  */
 int GLELZWByteStream::postEncode() {
-	register encodeState *sp = (encodeState*)m_Data;
+	encodeState *sp = (encodeState*)m_Data;
 	GLEBYTE* op = m_RawCP;
 	long nextbits = sp->lzw_nextbits;
 	long nextdata = sp->lzw_nextdata;
Index: gle-graphics/src/makefmt/parseAFM.cpp
===================================================================
--- gle-graphics.orig/src/makefmt/parseAFM.cpp
+++ gle-graphics/src/makefmt/parseAFM.cpp
@@ -220,7 +220,7 @@ static char *linetoken(FILE *stream)
  */
 
 //static enum parseKey recognize(ident)
-//  register char *ident;
+//  char *ident;
 // ** GLE ** replaced above two lines by the following one
 static enum parseKey recognize(char* ident)
 {
@@ -266,13 +266,13 @@ static enum parseKey recognize(char* ide
 
 //static BOOL parseGlobals(fp, gfi)
 //  FILE *fp;
-//  register GlobalFontInfo *gfi;
+//  GlobalFontInfo *gfi;
 // ** GLE ** replaced above three lines by the following one
 static BOOL parseGlobals(FILE *fp, GlobalFontInfo *gfi)
 {
     BOOL cont = TRUE, save = (gfi != NULL);
     int error = ok;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -442,14 +442,14 @@ static BOOL parseGlobals(FILE *fp, Globa
 
 //static int initializeArray(fp, cwi)
 //  FILE *fp;
-//  register int *cwi;
+//  int *cwi;
 // ** GLE ** replaced above three lines by the following one
 int initializeArray(FILE *fp, int *cwi)
 {
     BOOL cont = TRUE, found = FALSE;
     long opos = ftell(fp);
     int width = 0, i = 0, error = 0;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -527,13 +527,13 @@ int initializeArray(FILE *fp, int *cwi)
 
 //static parseCharWidths(fp, cwi)
 //  FILE *fp;
-//  register int *cwi;
+//  int *cwi;
 // ** GLE ** replaced above three lines by the following one
 static int parseCharWidths(FILE *fp, int *cwi)
 {
     BOOL cont = TRUE, save = (cwi != NULL);
     int pos = 0, error = ok;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -630,14 +630,14 @@ static int parseCharWidths(FILE *fp, int
 
 //static parseCharMetrics(fp, fi)
 //  FILE *fp;
-//  register FontInfo *fi;
+//  FontInfo *fi;
 // ** GLE ** replaced above three lines by the following one
 static int parseCharMetrics(FILE *fp, FontInfo *fi)
 {
     BOOL cont = TRUE, firstTime = TRUE;
     int error = ok, count = 0;
-    register CharMetricInfo *temp = fi->cmi;
-    register char *keyword;
+    CharMetricInfo *temp = fi->cmi;
+    char *keyword;
 
     while (cont)
     {
@@ -743,13 +743,13 @@ static int parseCharMetrics(FILE *fp, Fo
 
 //static parseTrackKernData(fp, fi)
 //  FILE *fp;
-//  register FontInfo *fi;
+//  FontInfo *fi;
 // ** GLE ** replaced above three lines by the following one
 static int parseTrackKernData(FILE *fp, FontInfo *fi)
 {
     BOOL cont = TRUE, save = (fi->tkd != NULL);
     int pos = 0, error = ok, tcount = 0;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -849,13 +849,13 @@ static int parseTrackKernData(FILE *fp,
 
 //static parsePairKernData(fp, fi)
 //  FILE *fp;
-//  register FontInfo *fi;
+//  FontInfo *fi;
 // ** GLE ** replaced above three lines by the following one
 static int parsePairKernData(FILE* fp, FontInfo *fi)
 {
     BOOL cont = TRUE, save = (fi->pkd != NULL);
     int pos = 0, error = ok, pcount = 0;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -977,13 +977,13 @@ static int parsePairKernData(FILE* fp, F
 
 //static parseCompCharData(fp, fi)
 //  FILE *fp;
-//  register FontInfo *fi;
+//  FontInfo *fi;
 // ** GLE ** replaced above three lines by the following one
 static int parseCompCharData(FILE *fp, FontInfo *fi)
 {
     BOOL cont = TRUE, firstTime = TRUE, save = (fi->ccd != NULL);
     int pos = 0, j = 0, error = ok, ccount = 0, pcount = 0;
-    register char *keyword;
+    char *keyword;
 
     while (cont)
     {
@@ -1123,7 +1123,7 @@ extern int parseFile (FILE *fp, FontInfo
     int code = ok; 	/* return code from each of the parsing routines */
     int error = ok;	/* used as the return code from this function */
 
-    register char *keyword; /* used to store a token */
+    char *keyword; /* used to store a token */
 
 
     /* storage data for the global variable ident */
Index: gle-graphics/src/CMakeLists.txt
===================================================================
--- gle-graphics.orig/src/CMakeLists.txt
+++ gle-graphics/src/CMakeLists.txt
@@ -170,7 +170,7 @@ if(APPLE)
 	add_compile_options(-Wno-c++11-compat-deprecated-writable-strings)
 	add_compile_options(-Wno-unsequenced)
 	add_compile_options(-Wno-macro-redefined)
-	add_compile_options(-Wno-deprecated-register)
+#	add_compile_options(-Wno-deprecated-register)
 	add_compile_options(-Wno-deprecated-declarations)
 	add_compile_definitions(BOOST_MATH_DISABLE_DEPRECATED_03_WARNING)
 endif()
