From c36f0af7ba75c133edc46f052b291188351b6c20 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 18 Jan 2023 15:49:16 -0800
Subject: [PATCH] Drop using register storage classifier

Its beeing dropped from latest standards beginning C++17

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ip/xjpg_dct.c                 |  4 +--
 ip/xjpg_dct.h                 |  4 +--
 prnt/hpcups/Mode9.cpp         |  2 +-
 prnt/hpcups/ModeDeltaPlus.cpp |  4 +--
 prnt/hpcups/jccolor.c         | 46 +++++++++++++++++------------------
 prnt/hpijs/compression.cpp    |  2 +-
 prnt/hpijs/jccolor.c          | 44 ++++++++++++++++-----------------
 prnt/hpijs/ljfastraster.cpp   |  4 +--
 prnt/hpps/psutil.c            |  6 ++---
 9 files changed, 58 insertions(+), 58 deletions(-)

diff --git a/ip/xjpg_dct.c b/ip/xjpg_dct.c
index 63f021b..1986923 100644
--- a/ip/xjpg_dct.c
+++ b/ip/xjpg_dct.c
@@ -103,7 +103,7 @@
  |         for the Winograd DCT.                                              |
  |____________________________________________________________________________|
 */
-void dct_forward (register int *block_p)
+void dct_forward (int *block_p)
 {
     #define CONST_FRAC_BITS 14   /* bits of frac in CONST_1-CONST_5 below */
 
@@ -257,7 +257,7 @@ void dct_forward (register int *block_p)
  |         and level-shifting, you must clamp these values to 0..255.         |
  |____________________________________________________________________________|
 */
-void dct_inverse (register int *block_p)
+void dct_inverse (int *block_p)
 {
     #define CONST_FRAC_BITS 13  /* bits of frac in CONST_1-CONST_5 below */
 
diff --git a/ip/xjpg_dct.h b/ip/xjpg_dct.h
index 7dc90f3..149d66f 100644
--- a/ip/xjpg_dct.h
+++ b/ip/xjpg_dct.h
@@ -43,8 +43,8 @@
  |____________________________________________________________________________|
 */
 
-void dct_forward (register int *block_p);
+void dct_forward (int *block_p);
 
-void dct_inverse (register int *block_p);
+void dct_inverse (int *block_p);
 
 /* End of File */
diff --git a/prnt/hpcups/Mode9.cpp b/prnt/hpcups/Mode9.cpp
index 94ff571..6cc210a 100644
--- a/prnt/hpcups/Mode9.cpp
+++ b/prnt/hpcups/Mode9.cpp
@@ -203,7 +203,7 @@ bool Mode9::Process(RASTERDATA* input)
     unsigned int    offset,byte_count,rem_count;
     Mode9_comtype       command;
     char* dest=    (char*) compressBuf;
-    register char *dptr=dest;
+    char *dptr=dest;
 
     while ( size > 0 )
     {
diff --git a/prnt/hpcups/ModeDeltaPlus.cpp b/prnt/hpcups/ModeDeltaPlus.cpp
index 4552f4a..6a5837f 100644
--- a/prnt/hpcups/ModeDeltaPlus.cpp
+++ b/prnt/hpcups/ModeDeltaPlus.cpp
@@ -241,8 +241,8 @@ bool ModeDeltaPlus::compress (BYTE   *outmem,
                               const     uint32_t    inheight,
                               uint32_t  horz_ht_dist)
 {
-    register    BYTE     *outptr = outmem;
-    register    uint32_t    col;
+    BYTE     *outptr = outmem;
+    uint32_t    col;
     const       BYTE     *seedrow;
     uint32_t                seedrow_count = 0;
     uint32_t                location = 0;
diff --git a/prnt/hpcups/jccolor.c b/prnt/hpcups/jccolor.c
index 7cc8906..6794575 100644
--- a/prnt/hpcups/jccolor.c
+++ b/prnt/hpcups/jccolor.c
@@ -73,7 +73,7 @@ typedef my_color_converter * my_cconvert_ptr;
 
 /* We allocate one big table and divide it up into eight parts, instead of
  * doing eight alloc_small requests.  This lets us use a single table base
- * address, which can be held in a register in the inner loops on many
+ * address, which can be held in a in the inner loops on many
  * machines (more than can hold all eight addresses, anyway).
  */
 
@@ -205,11 +205,11 @@ rgb_ycc_convert (j_compress_ptr cinfo,
 		 JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr0, outptr1, outptr2;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -261,11 +261,11 @@ rgb_gray_convert (j_compress_ptr cinfo,
 		  JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -300,11 +300,11 @@ cmyk_ycck_convert (j_compress_ptr cinfo,
 		   JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2, outptr3;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr0, outptr1, outptr2, outptr3;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -354,9 +354,9 @@ grayscale_convert (j_compress_ptr cinfo,
 		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		   JDIMENSION output_row, int num_rows)
 {
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
   int instride = cinfo->input_components;
 
@@ -383,10 +383,10 @@ null_convert (j_compress_ptr cinfo,
 	      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 	      JDIMENSION output_row, int num_rows)
 {
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
-  register int ci;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
+  int ci;
   int nc = cinfo->num_components;
   JDIMENSION num_cols = cinfo->image_width;
 
diff --git a/prnt/hpijs/compression.cpp b/prnt/hpijs/compression.cpp
index fcac793..10194ca 100644
--- a/prnt/hpijs/compression.cpp
+++ b/prnt/hpijs/compression.cpp
@@ -266,7 +266,7 @@ BOOL Mode9::Process(RASTERDATA* input)
     unsigned int    offset,byte_count,rem_count;
     Mode9_comtype       command;
     char* dest=    (char*) compressBuf;
-    register char *dptr=dest;
+    char *dptr=dest;
 
     while ( size > 0 )
     {
diff --git a/prnt/hpijs/jccolor.c b/prnt/hpijs/jccolor.c
index a6b2333..8486b65 100644
--- a/prnt/hpijs/jccolor.c
+++ b/prnt/hpijs/jccolor.c
@@ -206,11 +206,11 @@ rgb_ycc_convert (j_compress_ptr cinfo,
 		 JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr0, outptr1, outptr2;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -262,11 +262,11 @@ rgb_gray_convert (j_compress_ptr cinfo,
 		  JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -301,11 +301,11 @@ cmyk_ycck_convert (j_compress_ptr cinfo,
 		   JDIMENSION output_row, int num_rows)
 {
   my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
-  register int r, g, b;
-  register INT32 * ctab = cconvert->rgb_ycc_tab;
-  register JSAMPROW inptr;
-  register JSAMPROW outptr0, outptr1, outptr2, outptr3;
-  register JDIMENSION col;
+  int r, g, b;
+  INT32 * ctab = cconvert->rgb_ycc_tab;
+  JSAMPROW inptr;
+  JSAMPROW outptr0, outptr1, outptr2, outptr3;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
 
   while (--num_rows >= 0) {
@@ -355,9 +355,9 @@ grayscale_convert (j_compress_ptr cinfo,
 		   JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 		   JDIMENSION output_row, int num_rows)
 {
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
   JDIMENSION num_cols = cinfo->image_width;
   int instride = cinfo->input_components;
 
@@ -384,10 +384,10 @@ null_convert (j_compress_ptr cinfo,
 	      JSAMPARRAY input_buf, JSAMPIMAGE output_buf,
 	      JDIMENSION output_row, int num_rows)
 {
-  register JSAMPROW inptr;
-  register JSAMPROW outptr;
-  register JDIMENSION col;
-  register int ci;
+  JSAMPROW inptr;
+  JSAMPROW outptr;
+  JDIMENSION col;
+  int ci;
   int nc = cinfo->num_components;
   JDIMENSION num_cols = cinfo->image_width;
 
diff --git a/prnt/hpijs/ljfastraster.cpp b/prnt/hpijs/ljfastraster.cpp
index 8c7073a..7e82fac 100644
--- a/prnt/hpijs/ljfastraster.cpp
+++ b/prnt/hpijs/ljfastraster.cpp
@@ -919,8 +919,8 @@ BOOL ModeDeltaPlus::Compress (HPUInt8   *outmem,
                               const     uint32_t    inheight,
                               uint32_t  horz_ht_dist)
 {
-	register    HPUInt8     *outptr = outmem;
-	register    uint32_t    col;
+    HPUInt8     *outptr = outmem;
+    uint32_t    col;
     const       HPUInt8     *seedrow;
     uint32_t                seedrow_count = 0;
     uint32_t                location = 0;
diff --git a/prnt/hpps/psutil.c b/prnt/hpps/psutil.c
index 7282dc2..87fba4f 100644
--- a/prnt/hpps/psutil.c
+++ b/prnt/hpps/psutil.c
@@ -148,9 +148,9 @@ static int fcopy(long upto)
 /* build array of pointers to start/end of pages */
 void scanpages(void)
 {
-   register char *comment = buffer+2;
-   register int nesting = 0;
-   register long int record;
+   char *comment = buffer+2;
+   int nesting = 0;
+   long int record;
 
    if ((pageptr = (long *)malloc(sizeof(long)*maxpages)) == NULL)
       message(FATAL, "out of memory\n");
-- 
2.39.1

