[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Revised patch, for Karl's t1part.c



In e-mail, you tell me:
> That second hunk looks like something I fixed in dvipsk earlier and
> didn't make it into dvips 5.70 for whatever reason.  I sent the patch to
> Tom earlier.

I don't think the second hunk matches with whatever it was that you
fixed. However, my patch does winds up misplaced, given your changes
to ChooseChar, this time I've enclosed a patch for Karls's t1part.c
with enough context that it hopefully can't misplace itself.

Best Regards,

    Melissa.

Enc.

--- t1part.c.orig	Thu Mar 20 11:44:20 1997
+++ t1part.c	Thu Mar 20 11:52:28 1997
@@ -570,11 +570,13 @@
     CHAR *ThisChar = TmpChar;
 
     while (ThisChar != NULL)
     {
         CHAR *tm = ThisChar;
-        fprintf(fout, "dup %d %s put\n",ThisChar->num,ThisChar->name);
+	if (ThisChar->num > 0) {
+	  fprintf(fout, "dup %d %s put\n", ThisChar->num, ThisChar->name);
+	}
         ThisChar = ThisChar->NextChar;
         free(tm);
     }
 
     FirstCharW = NULL;
@@ -686,10 +688,22 @@
             {
                 ThisChar->choose=1;
                 return  1;
             }
         }
+	if (NextChar == NULL) {
+	      CHAR *NewChar = getmem(sizeof(CHAR));
+
+	      NewChar->name = getmem(length + 1);
+	      strcpy(NewChar->name, name);
+	      NewChar->length = length;
+	      NewChar->num = -1;
+	      NewChar->NextChar = NULL;
+	      NewChar->choose = 1;
+	      ThisChar->NextChar = NewChar;
+	      return 1;
+	}
         ThisChar = NextChar;
     }
     return -1;
 }