summaryrefslogtreecommitdiff
blob: e5f304200935a9c61f4f330dc359ac585670b1d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#! /bin/sh /usr/share/dpatch/dpatch-run
## 04_displaywho.dpatch by Roland Rosenfeld <roland@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Remove comment "For: <user>@<host> (<Realname>)" from PS files
## DP: (generated in genps.c and genpictex.c), because we won't ship personal
## DP: information in output files (Closes: #316382).

@DPATCH@
--- transfig~/fig2dev/dev/genpictex.c
+++ transfig/fig2dev/dev/genpictex.c
@@ -125,7 +125,9 @@
 {
 	char		host[256];
 	time_t		when;
+#ifdef DISPLAYWHO
 	struct passwd	*who;
+#endif
 
 	texfontsizes[0] = texfontsizes[1] = 
 		TEXFONTSIZE(font_size != 0.0? font_size : DEFAULT_FONT_SIZE);
@@ -139,12 +141,16 @@
 	fprintf(tfp, "%%%%Created by: %s Version %s Patchlevel %s\n",
 		prog, VERSION, PATCHLEVEL);
 	fprintf(tfp, "%%%%CreationDate: %s", ctime(&when));
+#ifdef DISPLAYWHO
 	who = getpwuid(getuid());
+#endif
 	if (gethostname(host, sizeof(host)) == -1)
 	    (void)strcpy(host, "unknown-host!?!?");
+#ifdef DISPLAYWHO
 	if (who)
 	   fprintf(tfp, "%%%%User: %s@%s (%s)\n",
 			who->pw_name, host, who->pw_gecos);
+#endif
 
 	/* print any whole-figure comments prefixed with "% " */
 	if (objects->comments) {
--- transfig~/fig2dev/dev/genps.c
+++ transfig/fig2dev/dev/genps.c
@@ -449,7 +449,9 @@
 F_compound	*objects;
 {
 	char		 host[256];
+#ifdef DISPLAYWHO
 	struct passwd	*who;
+#endif
 	time_t		 when;
 	int		 itmp, jtmp;
 	int 		 i;
@@ -618,7 +620,9 @@
 	else
 	    fprintf(tfp, "%%!PS-Adobe-2.0\n");		/* PostScript magic strings */
 
+#ifdef DISPLAYWHO
 	who = getpwuid(getuid());
+#endif
 	if (gethostname(host, sizeof(host)) == -1)
 	    (void)strcpy(host, "unknown-host!?!?");
 	(void) time(&when);
@@ -627,9 +631,11 @@
 	fprintf(tfp, "%%%%Creator: %s Version %s Patchlevel %s\n",
 		prog, VERSION, PATCHLEVEL);
 	fprintf(tfp, "%%%%CreationDate: %s", ctime(&when));
+#ifdef DISPLAYWHO
 	if (who)
 	   fprintf(tfp, "%%%%For: %s@%s (%s)\n",
 			who->pw_name, host, who->pw_gecos);
+#endif DISPLAYWHO
 
 	/* calc initial clipping area to size of the bounding box (this is needed
 		for later clipping by arrowheads */