~ubuntu-branches/ubuntu/trusty/glbsp/trusty

« back to all changes in this revision

Viewing changes to debian/patches/01_printf.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Darren Salt
  • Date: 2008-01-30 13:33:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080130133349-kgojg33vyiu8xbvp
Tags: 2.24-1
* New upstream release.
* Bumped the lib soname and the library package name due to one silly
  little binary incompatibility caused by changes in an exported struct.
  (Safe; nothing else currently in the archive has ever used libglbsp2.)
* Removed my patches since they're all applied upstream.
* Updated the list of documentation files.
* Build-time changes:
  - Switched from dh_movefiles to dh_install.
  - Updated my makefile to cope with upstream changes.
  - Corrected for debian-rules-ignores-make-clean-error.
  - Corrected for substvar-source-version-is-deprecated.
  - Link libglbsp, rather than glbsp, with libm and libz.
* Fixed shlibdeps. (Closes: #460387)
* Bumped standards version to 3.7.3 (no other changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## 01_printf.dpatch by Darren Salt <linux@youmustbejoking.demon.co.uk>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Various printf fixups.
6
 
 
7
 
@DPATCH@
8
 
diff -urNad glbsp-2.20~/cmdline/display.h glbsp-2.20/cmdline/display.h
9
 
--- glbsp-2.20~/cmdline/display.h       2005-09-13 11:15:36.000000000 +0100
10
 
+++ glbsp-2.20/cmdline/display.h        2006-08-12 16:29:55.738110936 +0100
11
 
@@ -28,8 +28,8 @@
12
 
 void TextShutdown(void);
13
 
 void TextDisableProgress(void);
14
 
 
15
 
-void TextFatalError(const char *str, ...);
16
 
-void TextPrintMsg(const char *str, ...);
17
 
+void TextFatalError(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
18
 
+void TextPrintMsg(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
19
 
 void TextTicker(void);
20
 
 
21
 
 boolean_g TextDisplayOpen(displaytype_e type);
22
 
diff -urNad glbsp-2.20~/glbsp.h glbsp-2.20/glbsp.h
23
 
--- glbsp-2.20~/glbsp.h 2005-09-13 11:18:05.000000000 +0100
24
 
+++ glbsp-2.20/glbsp.h  2006-08-12 16:29:23.385655876 +0100
25
 
@@ -147,13 +147,13 @@
26
 
   // goes wrong, e.g. out of memory.  This routine should show the
27
 
   // error to the user and abort the program.
28
 
   // 
29
 
-  void (* fatal_error)(const char *str, ...);
30
 
+  void (* fatal_error)(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
31
 
 
32
 
   // The print_msg routine is used to display the various messages
33
 
   // that occur, e.g. "Building GL nodes on MAP01" and that kind of
34
 
   // thing.
35
 
   // 
36
 
-  void (* print_msg)(const char *str, ...);
37
 
+  void (* print_msg)(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
38
 
 
39
 
   // This routine is called frequently whilst building the nodes, and
40
 
   // can be used to keep a GUI responsive to user input.  Many
41
 
diff -urNad glbsp-2.20~/seg.c glbsp-2.20/seg.c
42
 
--- glbsp-2.20~/seg.c   2005-09-13 11:18:37.000000000 +0100
43
 
+++ glbsp-2.20/seg.c    2006-08-12 16:29:23.385655876 +0100
44
 
@@ -1068,6 +1068,7 @@
45
 
         cur->vertex->x, cur->vertex->y,
46
 
         cur->before ? cur->before->index : -1,
47
 
         cur->after ? cur->after->index : -1,
48
 
+        next->vertex,
49
 
         next->vertex->x, next->vertex->y,
50
 
         next->before ? next->before->index : -1,
51
 
         next->after ? next->after->index : -1);
52
 
@@ -1150,9 +1151,8 @@
53
 
     {
54
 
       if (!cur->self_ref && !next->self_ref)
55
 
         PrintMiniWarn("Sector mismatch: #%d (%1.1f,%1.1f) != #%d (%1.1f,%1.1f)\n",
56
 
-            cur->after->index, next->before->index,
57
 
-            cur->vertex->x, cur->vertex->y,
58
 
-            next->vertex->x, next->vertex->y);
59
 
+            cur->after->index, cur->vertex->x, cur->vertex->y,
60
 
+            next->before->index, next->vertex->x, next->vertex->y);
61
 
 
62
 
       // choose the non-self-referencing sector when we can
63
 
       if (cur->self_ref && !next->self_ref)
64
 
diff -urNad glbsp-2.20~/system.c glbsp-2.20/system.c
65
 
--- glbsp-2.20~/system.c        2005-09-13 11:19:06.000000000 +0100
66
 
+++ glbsp-2.20/system.c 2006-08-12 16:29:23.389655932 +0100
67
 
@@ -252,15 +252,15 @@
68
 
 
69
 
   if (sizeof(uint8_g) != 1)
70
 
     FatalError("Sanity check failed: sizeof(uint8_g) = %d", 
71
 
-        sizeof(uint8_g));
72
 
+        (int)sizeof(uint8_g));
73
 
 
74
 
   if (sizeof(uint16_g) != 2)
75
 
     FatalError("Sanity check failed: sizeof(uint16_g) = %d", 
76
 
-        sizeof(uint16_g));
77
 
+        (int)sizeof(uint16_g));
78
 
 
79
 
   if (sizeof(uint32_g) != 4)
80
 
     FatalError("Sanity check failed: sizeof(uint32_g) = %d", 
81
 
-        sizeof(uint32_g));
82
 
+        (int)sizeof(uint32_g));
83
 
 
84
 
   /* check endianness */
85
 
 
86
 
diff -urNad glbsp-2.20~/system.h glbsp-2.20/system.h
87
 
--- glbsp-2.20~/system.h        2005-09-13 11:19:12.000000000 +0100
88
 
+++ glbsp-2.20/system.h 2006-08-12 16:29:23.389655932 +0100
89
 
@@ -46,14 +46,14 @@
90
 
 /* ----- function prototypes ---------------------------- */
91
 
 
92
 
 // fatal error messages (these don't return)
93
 
-void FatalError(const char *str, ...);
94
 
-void InternalError(const char *str, ...);
95
 
+void FatalError(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
96
 
+void InternalError(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
97
 
 
98
 
 // display normal messages & warnings to the screen
99
 
-void PrintMsg(const char *str, ...);
100
 
-void PrintVerbose(const char *str, ...);
101
 
-void PrintWarn(const char *str, ...);
102
 
-void PrintMiniWarn(const char *str, ...);
103
 
+void PrintMsg(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
104
 
+void PrintVerbose(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
105
 
+void PrintWarn(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
106
 
+void PrintMiniWarn(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
107
 
 
108
 
 // set message for certain errors
109
 
 void SetErrorMsg(const char *str);
110
 
@@ -66,7 +66,7 @@
111
 
 // these are only used for debugging
112
 
 void InitDebug(void);
113
 
 void TermDebug(void);
114
 
-void PrintDebug(const char *str, ...);
115
 
+void PrintDebug(const char *str, ...) __attribute__ ((format (printf, 1, 2)));
116
 
 
117
 
 // macros for the display stuff
118
 
 #define DisplayOpen        (* cur_funcs->display_open)
119
 
diff -urNad glbsp-2.20~/wad.c glbsp-2.20/wad.c
120
 
--- glbsp-2.20~/wad.c   2005-09-13 11:19:36.000000000 +0100
121
 
+++ glbsp-2.20/wad.c    2006-08-12 16:29:23.389655932 +0100
122
 
@@ -824,7 +824,7 @@
123
 
 # endif
124
 
   
125
 
   if (ftell(out_file) != lump->new_start)
126
 
-    PrintWarn("Consistency failure writing %s (%08X, %08X\n", 
127
 
+    PrintWarn("Consistency failure writing %s (%08lX, %08X\n", 
128
 
       lump->name, ftell(out_file), lump->new_start);
129
 
  
130
 
   if (lump->length == 0)
131
 
@@ -929,7 +929,7 @@
132
 
   
133
 
   if (ftell(out_file) != wad.dir_start)
134
 
     PrintWarn("Consistency failure writing lump directory "
135
 
-      "(%08X,%08X)\n", ftell(out_file), wad.dir_start);
136
 
+      "(%08lX,%08X)\n", ftell(out_file), wad.dir_start);
137
 
 
138
 
   for (cur=wad.dir_head; cur; cur=cur->next)
139
 
   {
140
 
@@ -1563,7 +1563,7 @@
141
 
     case LIMIT_VERTEXES: PrintMsg("Number of Vertices %s.\n", msg); break;
142
 
     case LIMIT_SECTORS:  PrintMsg("Number of Sectors %s.\n", msg); break;
143
 
     case LIMIT_SIDEDEFS: PrintMsg("Number of Sidedefs %s\n", msg); break;
144
 
-    case LIMIT_LINEDEFS: PrintMsg("Number of Linedefs\n", msg); break;
145
 
+    case LIMIT_LINEDEFS: PrintMsg("Number of Linedefs %s\n", msg); break;
146
 
 
147
 
     case LIMIT_SEGS:     PrintMsg("Number of Segs %s.\n", msg); break;
148
 
     case LIMIT_SSECTORS: PrintMsg("Number of Subsectors %s.\n", msg); break;