15df219375
psdim is a small utility to be used in conjunction with pstops. It looks at the contents of a postscript document to determine the size of the printed pages. From this, it calculates the optimal placement of the pages for n-up printing. It outputs a format string suitable for processing by pstops. Flavors: a4 - Use A4 paper size by default From Steven Mestdagh <steven.mestdagh@esat.kuleuven.be>
19 lines
551 B
Plaintext
19 lines
551 B
Plaintext
$OpenBSD: patch-src_psdim_c,v 1.1.1.1 2005/11/01 00:19:17 alek Exp $
|
|
--- src/psdim.c.orig Thu Mar 31 05:20:13 2005
|
|
+++ src/psdim.c Sat Oct 22 14:33:58 2005
|
|
@@ -52,10 +52,11 @@ int x2list[] = { 0, 8, 7, 8, 6, 8, 7, 8,
|
|
4, 8, 7, 8, 6, 8, 7, 8, 5, 8, 7, 8, 6, 8, 7, 8, };
|
|
|
|
char *strcat_safe(char *dest, const char *src) {
|
|
-
|
|
- dest = realloc(dest, strlen(dest)+strlen(src)+1);
|
|
+ int siz;
|
|
+ siz = strlen(dest)+strlen(src)+1;
|
|
+ dest = realloc(dest, siz);
|
|
if (dest) {
|
|
- strcat(dest, src);
|
|
+ strlcat(dest, src, siz);
|
|
}
|
|
return dest;
|
|
}
|