mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Move functions which are only locally used into their C files and
make them static. usage() in calendar.c event_*() in io.c PR: bin/118644 Approved by: bde@ (mentor)
This commit is contained in:
parent
35304a1641
commit
0d724b8765
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181323
@ -66,6 +66,8 @@ int f_dayAfter = 0; /* days after current date */
|
||||
int f_dayBefore = 0; /* days before current date */
|
||||
int Friday = 5; /* day before weekend */
|
||||
|
||||
static void usage(void) __dead2;
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
@ -140,7 +142,7 @@ main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
static void __dead2
|
||||
usage(void)
|
||||
{
|
||||
|
||||
|
@ -58,7 +58,6 @@ int isnow(char *, int *, int *, int *);
|
||||
FILE *opencal(void);
|
||||
void settime(time_t);
|
||||
time_t Mktime(char *);
|
||||
void usage(void);
|
||||
void setnnames(void);
|
||||
|
||||
#define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0)
|
||||
@ -73,24 +72,6 @@ extern int f_dayAfter; /* days after current date */
|
||||
extern int f_dayBefore; /* days before current date */
|
||||
extern int Friday; /* day before weekend */
|
||||
|
||||
/*
|
||||
* Event sorting related functions:
|
||||
* - Use event_add() to create a new event
|
||||
* - Use event_continue() to add more text to the last added event
|
||||
* - Use event_print_all() to display them in time chronological order
|
||||
*/
|
||||
struct event *event_add(struct event *, int, int, char *, int, char *);
|
||||
void event_continue(struct event *events, char *txt);
|
||||
void event_print_all(FILE *fp, struct event *events);
|
||||
struct event {
|
||||
int month;
|
||||
int day;
|
||||
int var;
|
||||
char *date;
|
||||
char *text;
|
||||
struct event *next;
|
||||
};
|
||||
|
||||
struct fixs {
|
||||
char *name;
|
||||
int len;
|
||||
|
@ -66,6 +66,23 @@ __FBSDID("$FreeBSD$");
|
||||
#include "pathnames.h"
|
||||
#include "calendar.h"
|
||||
|
||||
/*
|
||||
* Event sorting related functions:
|
||||
* - Use event_add() to create a new event
|
||||
* - Use event_continue() to add more text to the last added event
|
||||
* - Use event_print_all() to display them in time chronological order
|
||||
*/
|
||||
static struct event *event_add(struct event *, int, int, char *, int, char *);
|
||||
static void event_continue(struct event *events, char *txt);
|
||||
static void event_print_all(FILE *fp, struct event *events);
|
||||
struct event {
|
||||
int month;
|
||||
int day;
|
||||
int var;
|
||||
char *date;
|
||||
char *text;
|
||||
struct event *next;
|
||||
};
|
||||
|
||||
const char *calendarFile = "calendar"; /* default calendar file */
|
||||
const char *calendarHomes[] = {".calendar", _PATH_INCLUDE}; /* HOME */
|
||||
@ -170,7 +187,7 @@ cal(void)
|
||||
closecal(fp);
|
||||
}
|
||||
|
||||
struct event *
|
||||
static struct event *
|
||||
event_add(struct event *events, int month, int day,
|
||||
char *date, int var, char *txt)
|
||||
{
|
||||
@ -200,7 +217,7 @@ event_add(struct event *events, int month, int day,
|
||||
return e;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
event_continue(struct event *e, char *txt)
|
||||
{
|
||||
char *text;
|
||||
@ -228,7 +245,7 @@ event_continue(struct event *e, char *txt)
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
event_print_all(FILE *fp, struct event *events)
|
||||
{
|
||||
struct event *e, *e_next;
|
||||
|
Loading…
Reference in New Issue
Block a user