convert patches to unified diffs

This commit is contained in:
brad 1999-10-30 21:09:52 +00:00
parent 6074baf00e
commit 60e767392b
3 changed files with 68 additions and 111 deletions

View File

@ -1,36 +1,20 @@
*** misc.h.orig Tue Mar 24 03:39:38 1998
--- misc.h Wed May 20 16:16:04 1998
***************
*** 23,29 ****
long random(void);
#endif
! #if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__)
#if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX) || defined(_SCO_DS)
void srandom(unsigned int);
#else
--- 23,29 ----
long random(void);
#endif
! #if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__) & !defined(__OpenBSD__)
#if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX) || defined(_SCO_DS)
void srandom(unsigned int);
#else
***************
*** 102,108 ****
void GetDefaultWH(int *w, int *h);
char *GetDefaultRC(void);
void SetIconImage(Widget w);
! void main(int argc, char *argv[]);
/* misc.c */
Widget GetToplevel(Widget w);
--- 102,108 ----
void GetDefaultWH(int *w, int *h);
char *GetDefaultRC(void);
void SetIconImage(Widget w);
! int main(int argc, char *argv[]);
/* misc.c */
Widget GetToplevel(Widget w);
--- misc.h.orig Tue Jun 9 17:07:47 1998
+++ misc.h Fri Oct 29 18:06:35 1999
@@ -23,7 +23,7 @@
long random(void);
#endif
-#if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__)
+#if !defined(linux) & !defined(__EMX__) & !defined(__FreeBSD__) & !defined(__OpenBSD__)
#if defined(BSD4_4) || defined(HPArchitecture) || defined(SGIArchitecture) || defined(_AIX) || defined(_SCO_DS)
void srandom(unsigned int);
#else
@@ -102,7 +102,7 @@
void GetDefaultWH(int *w, int *h);
char *GetDefaultRC(void);
void SetIconImage(Widget w);
-void main(int argc, char *argv[]);
+int main(int argc, char *argv[]);
/* misc.c */
Widget GetToplevel(Widget w);

View File

@ -1,19 +1,11 @@
*** main.c.orig Wed May 20 16:13:32 1998
--- main.c Wed May 20 16:13:43 1998
***************
*** 275,281 ****
}
! void
main(int argc, char *argv[])
{
Display *dpy;
--- 275,281 ----
}
! int
main(int argc, char *argv[])
{
Display *dpy;
--- main.c.orig Tue Jun 9 17:14:27 1998
+++ main.c Fri Oct 29 18:07:30 1999
@@ -275,7 +275,7 @@
}
-void
+int
main(int argc, char *argv[])
{
Display *dpy;

View File

@ -1,56 +1,37 @@
*** readRC.c.orig Sat May 30 13:39:30 1998
--- readRC.c Sat May 30 13:41:19 1998
***************
*** 30,41 ****
#include <unistd.h>
#endif
- #ifdef __STDC__
- extern char *mktemp(char *);
- #else
- extern char *mktemp();
- #endif /* __STDC__ */
-
#define RC_FILENAME ".XPaintrc"
static String defaultRC[] =
--- 30,35 ----
***************
*** 66,82 ****
{
char *n;
char xx[256];
if ((n = getenv("TMPDIR")) == NULL)
n = "/tmp";
strcpy(xx, n);
strcat(xx, "/XPaintXXXXXXX");
! n = mktemp(xx);
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
! return fopen(tempName[tempIndex], "w");
}
static void
--- 60,78 ----
{
char *n;
char xx[256];
+ int fd;
if ((n = getenv("TMPDIR")) == NULL)
n = "/tmp";
strcpy(xx, n);
strcat(xx, "/XPaintXXXXXXX");
! fd = mkstemp(xx);
! n = xx;
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
! return fdopen(fd, "w");
}
static void
--- readRC.c.orig Tue Jun 25 04:50:39 1996
+++ readRC.c Fri Oct 29 18:08:12 1999
@@ -30,12 +30,6 @@
#include <unistd.h>
#endif
-#ifdef __STDC__
-extern char *mktemp(char *);
-#else
-extern char *mktemp();
-#endif /* __STDC__ */
-
#define RC_FILENAME ".XPaintrc"
static String defaultRC[] =
@@ -66,17 +60,19 @@
{
char *n;
char xx[256];
+ int fd;
if ((n = getenv("TMPDIR")) == NULL)
n = "/tmp";
strcpy(xx, n);
strcat(xx, "/XPaintXXXXXXX");
- n = mktemp(xx);
+ fd = mkstemp(xx);
+ n = xx;
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
- return fopen(tempName[tempIndex], "w");
+ return fdopen(fd, "w");
}
static void