mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-30 15:23:26 +03:00
5a4bc5b072
svn path=/nixpkgs/trunk/; revision=24278
142 lines
3.3 KiB
Diff
142 lines
3.3 KiB
Diff
--- get/getx11/XGetHClrs.c
|
|
+++ get/getx11/XGetHClrs.c
|
|
@@ -1,5 +1,4 @@
|
|
#ifndef XLIBINT_H_NOT_AVAILABLE
|
|
-#include <X11/copyright.h>
|
|
|
|
/* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */
|
|
/* Copyright Massachusetts Institute of Technology 1986 */
|
|
--- tools/mallocNd.c
|
|
+++ tools/mallocNd.c
|
|
@@ -67,7 +67,7 @@
|
|
|
|
/* Imports */
|
|
#include <stdio.h>
|
|
-extern char *malloc();
|
|
+#include <string.h>
|
|
|
|
/* Forward declarations */
|
|
char *BuildIndirectionTable();
|
|
--- tools/into.c
|
|
+++ tools/into.c
|
|
@@ -40,8 +40,8 @@
|
|
static char buf[MAXPATHLEN+1];
|
|
short forceflg; /* overwrite an unwritable file? */
|
|
|
|
-extern int errno;
|
|
-extern char *sys_errlist[];
|
|
+#include <errno.h>
|
|
+#include <string.h>
|
|
|
|
void
|
|
main(argc, argv)
|
|
@@ -103,7 +103,7 @@
|
|
if (ferror(outf))
|
|
{
|
|
fprintf(stderr, "into: %s, \"%s\" not modified\n",
|
|
- sys_errlist[errno], argv[1]);
|
|
+ strerror(errno), argv[1]);
|
|
unlink(buf);
|
|
exit(1);
|
|
}
|
|
--- cnv/tex/dvirle2.c
|
|
+++ cnv/tex/dvirle2.c
|
|
@@ -55,7 +55,6 @@
|
|
void DumpTopOfBand(), MoveDown(), WriteBuf(), WriteBlanks();
|
|
|
|
char *ProgName;
|
|
-extern int errno;
|
|
extern char *optarg;
|
|
extern int optind;
|
|
|
|
--- cnv/wasatchrle.c
|
|
+++ cnv/wasatchrle.c
|
|
@@ -32,7 +32,6 @@
|
|
#include <errno.h>
|
|
#include "rle.h"
|
|
|
|
-extern int errno;
|
|
|
|
/* "short" in our world is 16 bits. Beware of swyte-bopping. */
|
|
|
|
--- get/getx11/x11_stuff.c
|
|
+++ get/getx11/x11_stuff.c
|
|
@@ -155,7 +155,6 @@
|
|
IPC_CREAT|0777 );
|
|
if ( img->shm_img.shmid < 0 )
|
|
{
|
|
- extern int errno;
|
|
if ( errno == ENOSPC )
|
|
{
|
|
if ( !no_shared_space )
|
|
@@ -361,7 +360,6 @@ Boolean reallocate;
|
|
XDestroyImage( image );
|
|
if ( img->shm_pix.shmid < 0 )
|
|
{
|
|
- extern int errno;
|
|
if ( errno == ENOSPC )
|
|
{
|
|
if ( !no_shared_space )
|
|
--- get/qcr/qcr.h
|
|
+++ get/qcr/qcr.h
|
|
@@ -6,8 +6,6 @@
|
|
#define GREEN 1
|
|
#define BLUE 2
|
|
|
|
-extern int errno;
|
|
-
|
|
/* Command defs for QCR-Z Film Recorder */
|
|
|
|
/* These are for 8 bit Look Up Tables */
|
|
--- get/gettaac.c
|
|
+++ get/gettaac.c
|
|
@@ -24,6 +24,7 @@
|
|
* Send bug fixes and improvements to: ksp@maxwell.nde.swri.edu
|
|
*/
|
|
|
|
+#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <strings.h>
|
|
#include <signal.h>
|
|
@@ -459,7 +460,6 @@ char *template;
|
|
char nonUnique;
|
|
char twiddleUserCompletion;
|
|
|
|
- extern int errno;
|
|
struct direct *nameEntry;
|
|
DIR *dirChan;
|
|
struct passwd *pwdEntry;
|
|
--- tools/clock/rleClock.c
|
|
+++ tools/clock/rleClock.c
|
|
@@ -598,7 +598,7 @@
|
|
{ TRUE, "-tf", STRING, "Text area format string", (char *)&FormatString },
|
|
{ FALSE, "-Xm", BOOL, "Output the alpha channel on RGB", (char *)&DebugAlpha },
|
|
{ FALSE, "-D", BOOL, "Turn on debugging", (char *)&Debug },
|
|
- NULL
|
|
+ { FALSE, NULL }
|
|
};
|
|
|
|
void
|
|
--- tools/to8.c
|
|
+++ tools/to8.c
|
|
@@ -175,7 +175,7 @@
|
|
* Give it a background color of black, since the real background
|
|
* will be dithered anyway.
|
|
*/
|
|
- if ( in_hdr.background != NULL )
|
|
+ if ( in_hdr.background != 0 )
|
|
{
|
|
out_hdr.bg_color = (int *)malloc( sizeof( int ) );
|
|
RLE_CHECK_ALLOC( cmd_name( argv ), out_hdr.bg_color, 0 );
|
|
--- cnv/rletoabA62/rletoabA62.c
|
|
+++ cnv/rletoabA62/rletoabA62.c
|
|
@@ -157,7 +157,7 @@
|
|
exit(1);
|
|
}
|
|
if (optind < argc) {
|
|
- if ((file = open(argv[optind], 0)) == NULL) {
|
|
+ if ((file = open(argv[optind], 0)) == -1) {
|
|
perror(argv[optind]);
|
|
exit(1);
|
|
}
|