Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
340ff9de
Commit
340ff9de
authored
Oct 12, 1994
by
David J. MacKenzie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate some -Wall warnings.
parent
e2f9d9af
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
75 additions
and
39 deletions
+75
-39
lib-src/b2m.c
lib-src/b2m.c
+2
-0
lib-src/cvtmail.c
lib-src/cvtmail.c
+26
-19
lib-src/digest-doc.c
lib-src/digest-doc.c
+2
-0
lib-src/emacsclient.c
lib-src/emacsclient.c
+2
-1
lib-src/etags.c
lib-src/etags.c
+4
-0
lib-src/fakemail.c
lib-src/fakemail.c
+2
-0
lib-src/hexl.c
lib-src/hexl.c
+4
-0
lib-src/make-docfile.c
lib-src/make-docfile.c
+11
-2
lib-src/movemail.c
lib-src/movemail.c
+2
-0
lib-src/profile.c
lib-src/profile.c
+1
-1
lib-src/sorted-doc.c
lib-src/sorted-doc.c
+14
-12
lib-src/test-distrib.c
lib-src/test-distrib.c
+2
-2
lib-src/timer.c
lib-src/timer.c
+0
-1
lib-src/wakeup.c
lib-src/wakeup.c
+1
-0
lib-src/yow.c
lib-src/yow.c
+2
-1
No files found.
lib-src/b2m.c
View file @
340ff9de
...
...
@@ -40,6 +40,7 @@ int header = FALSE, printing;
time_t
ltoday
;
char
from
[
MAX_DATA_LEN
],
labels
[
MAX_DATA_LEN
],
data
[
MAX_DATA_LEN
],
*
p
,
*
today
;
int
main
(
argc
,
argv
)
int
argc
;
char
**
argv
;
...
...
@@ -117,4 +118,5 @@ main (argc, argv)
if
(
printing
)
puts
(
data
);
}
return
0
;
}
lib-src/cvtmail.c
View file @
340ff9de
...
...
@@ -36,10 +36,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
char
*
malloc
();
char
*
realloc
();
char
*
getenv
();
char
*
xmalloc
();
char
*
xrealloc
();
char
*
getenv
();
void
skip_to_lf
();
int
main
(
argc
,
argv
)
int
argc
;
char
*
argv
[];
...
...
@@ -53,7 +56,7 @@ main (argc, argv)
FILE
*
mddf
;
FILE
*
mfilef
;
FILE
*
cff
;
char
pre
[
10
]
,
post
[
100
]
;
char
pre
[
10
];
char
name
[
14
];
int
c
;
...
...
@@ -103,6 +106,7 @@ main (argc, argv)
return
0
;
}
void
skip_to_lf
(
stream
)
FILE
*
stream
;
{
...
...
@@ -111,6 +115,26 @@ skip_to_lf (stream)
;
}
void
error
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
fprintf
(
stderr
,
"cvtmail: "
);
fprintf
(
stderr
,
s1
,
s2
);
fprintf
(
stderr
,
"
\n
"
);
}
/* Print error message and exit. */
void
fatal
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
error
(
s1
,
s2
);
exit
(
1
);
}
char
*
xmalloc
(
size
)
unsigned
size
;
...
...
@@ -131,20 +155,3 @@ xrealloc (ptr, size)
fatal
(
"virtual memory exhausted"
);
return
result
;
}
/* Print error message and exit. */
fatal
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
error
(
s1
,
s2
);
exit
(
1
);
}
error
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
fprintf
(
stderr
,
"cvtmail: "
);
fprintf
(
stderr
,
s1
,
s2
);
fprintf
(
stderr
,
"
\n
"
);
}
lib-src/digest-doc.c
View file @
340ff9de
...
...
@@ -6,6 +6,8 @@
but in texinfo format and sorted by function/variable name. */
#include <stdio.h>
int
main
()
{
register
int
ch
;
...
...
lib-src/emacsclient.c
View file @
340ff9de
...
...
@@ -55,6 +55,7 @@ main (argc, argv)
extern
char
*
strerror
();
extern
int
errno
;
int
main
(
argc
,
argv
)
int
argc
;
char
**
argv
;
...
...
@@ -167,7 +168,7 @@ main (argc, argv)
while
(
str
=
fgets
(
string
,
BUFSIZ
,
out
))
printf
(
"%s"
,
str
);
exit
(
0
)
;
return
0
;
}
#else
/* This is the SYSV IPC section */
...
...
lib-src/etags.c
View file @
340ff9de
...
...
@@ -55,6 +55,7 @@ char pot_etags_version[] = "@(#) pot revision number is 10.32";
#include "getopt.h"
extern
char
*
getenv
();
char
*
malloc
(),
*
realloc
();
/* Define CTAGS to make the program "ctags" compatible with the usual one.
Let it undefined to make the program "etags", which makes emacs-style
...
...
@@ -161,6 +162,9 @@ char *etags_getcwd ();
char
*
relative_filename
(),
*
absolute_filename
(),
*
absolute_dirname
();
char
*
xmalloc
(),
*
xrealloc
();
int
total_size_of_entries
();
int
string_numeric_p
();
int
substr
();
int
prestr
();
long
readline
();
void
Asm_labels
();
...
...
lib-src/fakemail.c
View file @
340ff9de
...
...
@@ -23,11 +23,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
/* This program isnot used in BSD, so just avoid loader complaints. */
void
main
()
{
}
#else
/* not BSD 4.2 (or newer) */
#ifdef MSDOS
void
main
()
{
}
...
...
lib-src/hexl.c
View file @
340ff9de
...
...
@@ -16,6 +16,9 @@ int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1;
int
group_by
=
DEFAULT_GROUPING
;
char
*
progname
;
void
usage
();
int
main
(
argc
,
argv
)
int
argc
;
char
*
argv
[];
...
...
@@ -231,6 +234,7 @@ main (argc, argv)
return
0
;
}
void
usage
()
{
fprintf
(
stderr
,
"usage: %s [-de] [-iso]
\n
"
,
progname
);
...
...
lib-src/make-docfile.c
View file @
340ff9de
...
...
@@ -44,8 +44,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define READ_BINARY "r"
#endif
/* not MSDOS */
int
scan_file
();
int
scan_lisp_file
();
int
scan_c_file
();
FILE
*
outfile
;
int
main
(
argc
,
argv
)
int
argc
;
char
**
argv
;
...
...
@@ -83,11 +88,13 @@ main (argc, argv)
#ifndef VMS
exit
(
err_count
);
/* see below - shane */
#endif
/* VMS */
return
err_count
;
}
/* Read file FILENAME and output its doc strings to outfile. */
/* Return 1 if file is not found, 0 if it is found. */
int
scan_file
(
filename
)
char
*
filename
;
{
...
...
@@ -109,6 +116,7 @@ char buf[128];
Convert escape sequences \n and \t to newline and tab;
discard \ followed by newline. */
int
read_c_string
(
infile
,
printflag
)
FILE
*
infile
;
int
printflag
;
...
...
@@ -156,6 +164,7 @@ read_c_string (infile, printflag)
/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
MINARGS and MAXARGS are the minimum and maximum number of arguments. */
void
write_c_args
(
out
,
func
,
buf
,
minargs
,
maxargs
)
FILE
*
out
;
char
*
func
,
*
buf
;
...
...
@@ -240,6 +249,7 @@ write_c_args (out, func, buf, minargs, maxargs)
Looks for DEFUN constructs such as are defined in ../src/lisp.h.
Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED. */
int
scan_c_file
(
filename
,
mode
)
char
*
filename
,
*
mode
;
{
...
...
@@ -486,7 +496,7 @@ read_lisp_symbol (infile, buffer)
skip_white
(
infile
);
}
int
scan_lisp_file
(
filename
,
mode
)
char
*
filename
,
*
mode
;
{
...
...
@@ -504,7 +514,6 @@ scan_lisp_file (filename, mode)
while
(
!
feof
(
infile
))
{
char
buffer
[
BUFSIZ
];
char
*
fillp
=
buffer
;
char
type
;
if
(
c
!=
'\n'
)
...
...
lib-src/movemail.c
View file @
340ff9de
...
...
@@ -546,11 +546,13 @@ popmail (user, outfile)
* directories have lost mail when over quota because these checks were
* not made in previous versions of movemail. */
#ifdef BSD
if
(
fsync
(
mbfi
)
<
0
)
{
error
(
"Error in fsync: %s"
,
strerror
(
errno
));
return
(
1
);
}
#endif
if
(
close
(
mbfi
)
==
-
1
)
{
...
...
lib-src/profile.c
View file @
340ff9de
...
...
@@ -39,7 +39,7 @@ static char time_string[30];
/* Reset the stopwatch to zero. */
int
void
reset_watch
()
{
EMACS_GET_TIME
(
TV1
);
...
...
lib-src/sorted-doc.c
View file @
340ff9de
...
...
@@ -35,17 +35,9 @@ struct docstr /* Allocated thing for an entry. */
};
/* Print error message and exit. */
fatal
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
error
(
s1
,
s2
);
exit
(
1
);
}
/* Print error message. `s1' is printf control string, `s2' is arg for it. */
void
error
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
...
...
@@ -54,6 +46,16 @@ error (s1, s2)
fprintf
(
stderr
,
"
\n
"
);
}
/* Print error message and exit. */
void
fatal
(
s1
,
s2
)
char
*
s1
,
*
s2
;
{
error
(
s1
,
s2
);
exit
(
1
);
}
/* Like malloc but get fatal error if memory is exhausted. */
char
*
...
...
@@ -67,7 +69,7 @@ xmalloc (size)
}
char
*
str
sav
(
str
)
x
str
dup
(
str
)
char
*
str
;
{
char
*
buf
=
xmalloc
(
strlen
(
str
)
+
1
);
...
...
@@ -98,12 +100,12 @@ char *states[] =
"WAITING"
,
"BEG_NAME"
,
"NAME_GET"
,
"BEG_DESC"
,
"DESC_GET"
};
int
main
()
{
register
DOCSTR
*
dp
=
NULL
;
/* allocated DOCSTR */
register
LINE
*
lp
=
NULL
;
/* allocated line */
register
char
*
bp
;
/* ptr inside line buffer */
int
notfirst
=
0
;
/* set after read something */
register
enum
state
state
=
WAITING
;
/* state at start */
int
cnt
=
0
;
/* number of DOCSTRs read */
...
...
@@ -169,7 +171,7 @@ main ()
else
/* saving and changing state */
{
*
bp
=
NUL
;
bp
=
str
sav
(
buf
);
bp
=
x
str
dup
(
buf
);
if
(
state
==
NAME_GET
)
dp
->
name
=
bp
;
...
...
lib-src/test-distrib.c
View file @
340ff9de
...
...
@@ -32,6 +32,7 @@ cool_read (fd, buf, size)
}
}
int
main
(
argc
,
argv
)
int
argc
;
char
**
argv
;
...
...
@@ -63,7 +64,6 @@ have been corrupted in the files of Emacs, and it will not work.\n",
close
(
fd
);
#ifdef VMS
exit
(
1
);
/* On VMS, success is 1. */
#else
exit
(
0
);
#endif
return
(
0
);
}
lib-src/timer.c
View file @
340ff9de
...
...
@@ -199,7 +199,6 @@ void
getevent
()
{
int
i
;
int
n_events
;
/* In principle the itimer should be disabled on entry to this
function, but it really doesn't make any important difference
...
...
lib-src/wakeup.c
View file @
340ff9de
...
...
@@ -18,6 +18,7 @@
struct
tm
*
localtime
();
void
main
(
argc
,
argv
)
int
argc
;
char
**
argv
;
...
...
lib-src/yow.c
View file @
340ff9de
...
...
@@ -30,6 +30,7 @@
&res;})
#endif
int
main
(
argc
,
argv
)
int
argc
;
char
*
argv
[];
...
...
@@ -58,7 +59,7 @@ main (argc, argv)
setup_yow
(
fp
);
yow
(
fp
);
fclose
(
fp
);
exit
(
0
)
;
return
0
;
}
static
long
len
=
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment