1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
$NetBSD: patch-af,v 1.3 2012/11/01 19:27:36 joerg Exp $
--- xcalpr/xcalpr.c.orig 2012-10-30 21:25:09.000000000 +0000
+++ xcalpr/xcalpr.c
@@ -59,6 +59,7 @@ static char *copyright = "@(#)Copyrig
***/
#include <stdio.h>
+#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <time.h>
@@ -86,7 +87,7 @@ static char *daynames[] = {"Sun", "Mon",
static char *dayfiles[7]; /* connected contents of any dayfiles */
-static FILE *fout = stdout;
+static FILE *fout;
static int mon[] = {
31, 28, 31, 30,
@@ -100,8 +101,6 @@ static int mon[] = {
static char *memerr = "No more memory\n";
static char *usage = "Usage: xcalpr [-d dir][-x][-c][-u user][-f file] [month list]\n";
-char *malloc();
-
/*
* Routines
*/
@@ -132,6 +131,8 @@ main(argc, argv)
int ac;
int yr;
+ fout = stdout;
+
while ((c = getopt(argc, argv, "d:u:f:cxv")) != EOF) {
switch (c) {
@@ -494,7 +495,7 @@ connect_file(filename, bytes)
if (statb.st_size == 0) {
*bytes = 0;
- return;
+ return NULL;
}
fibase = readbfile(fd, statb.st_size);
|