1 diff -up texlive-2007/texk/dvipsk/hps.c.dvipsoverflow texlive-2007/texk/dvipsk/hps.c
2 --- texlive-2007/texk/dvipsk/hps.c.dvipsoverflow 2007-11-22 15:44:30.000000000 +0100
3 +++ texlive-2007/texk/dvipsk/hps.c 2007-11-22 15:46:10.000000000 +0100
4 @@ -441,19 +441,32 @@ int href_name_match P2C(char *, h, char
6 void stamp_hps P1C(Hps_link *, pl)
11 error("Null pointer, oh no!") ;
14 - /* print out the proper pdfm with local page info only
15 - * target info will be in the target dictionary */
16 - (void)sprintf(tmpbuf,
17 - " (%s) [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] pdfm ", pl->title, pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
18 - pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
19 - pl->color[0], pl->color[1], pl->color[2]) ;
23 + if(pl->title == NULL) {
24 + error("Null pointer, oh no!") ;
28 + tmpbuf = (char *) malloc(strlen(pl->title)+200);
29 + if(tmpbuf == NULL) {
30 + error("out of memory, oh no!") ;
34 + /* print out the proper pdfm with local page info only
35 + * target info will be in the target dictionary */
36 + (void)sprintf(tmpbuf,
37 + " (%s) [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] pdfm ",
38 + pl->title, pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
39 + pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
40 + pl->color[0], pl->color[1], pl->color[2]) ;
47 @@ -462,18 +475,31 @@ void stamp_hps P1C(Hps_link *, pl)
49 void stamp_external P2C(char *, s, Hps_link *, pl)
54 error("Null pointer, oh no!") ;
57 - /* print out the proper pdfm with local page info only
58 - * target info will be in the target dictionary */
59 - (void)sprintf(tmpbuf," [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] (%s) pdfm ", pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
60 - pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
61 - pl->color[0], pl->color[1], pl->color[2], s) ;
67 + error("Null pointer, oh no!") ;
71 + tmpbuf = (char *) malloc(strlen(s) + 200);
72 + if(tmpbuf == NULL) {
73 + error("out of memory, oh no!") ;
77 + /* print out the proper pdfm with local page info only
78 + * target info will be in the target dictionary */
79 + (void)sprintf(tmpbuf," [[%.0f %.0f %.0f %.0f] [%i %i %i [%i %i]] [%.0f %.0f %.0f]] (%s) pdfm ",
80 + pl->rect.llx, pl->rect.lly, pl->rect.urx, pl->rect.ury,
81 + pl->border[0], pl->border[1], pl->border[2], pl->border[3],pl->border[4],
82 + pl->color[0], pl->color[1], pl->color[2], s) ;
87 void finish_hps P1H(void) {