dtcm: Change to ANSI function definitions

This commit is contained in:
Peter Howkins
2018-06-28 04:10:42 +01:00
parent 7936fae07b
commit 35dc4283e4
20 changed files with 101 additions and 211 deletions

View File

@@ -464,7 +464,7 @@ lookup(char *id)
static char *lptr;
int yylex()
int yylex(void)
{
extern int yylval;
int sign;

View File

@@ -327,7 +327,7 @@ props_clean_up(Props *p) {
}
static void
init_props()
init_props(void)
{
#define LIBDTCM_CAT "libdtcm"
static int is_inited = 0;

View File

@@ -147,14 +147,14 @@ ntimes_this_week(u_int weekmask, int firstday)
/* Return beginning of time */
extern Tick
get_bot()
get_bot(void)
{
return bot;
}
/* Return end of time */
extern Tick
get_eot()
get_eot(void)
{
return eot;
}
@@ -255,8 +255,7 @@ year(Tick t)
}
extern int
month(t)
Tick t;
month(Tick t)
{
struct tm *tm;
_Xltimeparams localtime_buf;
@@ -945,7 +944,7 @@ xytoclock(int x, int y, Tick t)
}
extern Tick
now()
now(void)
{
return(time(0));
}
@@ -972,7 +971,7 @@ set_timezone(char *tzname)
}
extern long
gmt_off()
gmt_off(void)
{
struct tm tm;
Tick t;
@@ -1001,7 +1000,7 @@ gmt_off()
* of the routines in this file and the caller of these routines.
*/
extern void
init_time()
init_time(void)
{
struct tm tm, gm;
Tick t;

View File

@@ -102,7 +102,7 @@ extern int pclose(FILE *);
*
*/
extern char*
cm_def_printer()
cm_def_printer(void)
{
FILE *fp;
char message[257];
@@ -291,8 +291,7 @@ cr_to_str(char *s)
/* VARARGS1 */
extern void
syserr(msg, a1, a2, a3)
char *msg;
syserr(char *msg, int a1, int a2, int a3)
{
/* Taken from Unix World, July 1989, p. 66 */
int saveerr;
@@ -525,7 +524,7 @@ get_tail(char *str, char sep)
}
extern char *
cm_get_credentials()
cm_get_credentials(void)
{
char *name, *host;
static char *login = NULL;
@@ -541,7 +540,7 @@ cm_get_credentials()
}
extern char *
cm_get_local_host()
cm_get_local_host(void)
{
static char *local_host;
@@ -558,7 +557,7 @@ cm_get_local_host()
}
extern char *
cm_get_uname()
cm_get_uname(void)
{
static char *name;
struct passwd *pw;
@@ -574,7 +573,7 @@ cm_get_uname()
}
extern char *
cm_get_local_domain()
cm_get_local_domain(void)
{
static char *local_domain;