-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintcal.c
68 lines (62 loc) · 2.05 KB
/
printcal.c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#include "romcal.h"
void printcal(struct Info *info,
struct Cal *cal)
{
/*----------------------------------------------------------------------*
*
* @(#)ROMCAL printcal.c 6.2 02/12/06 17:40:28
*
* Copyright (C) 1993,1995,1999 Kenneth G. Bath
* Permission to use and modify this software and its
* documentation for any purpose other than its incorporation
* into a commercial product is hereby granted without fee.
*
* Permission to copy and distribute this software and its
* documentation only for non-commercial use is also granted
* without fee, provided, however, that the above copyright
* notice appear in all copies, that both that copyright
* notice and this permission notice appear in supporting
* documentation. The author makes no representations about
* the suitability of this software for any purpose. It is
* provided "as is" without express or implied warranty.
*
*-------------------- Software Unit Description -----------------------*
*
* This module prints out the calendar that has been calculated
* by all of the other modules.
*
*---------------------- Software Unit History -------------------------*
*
* 17Mar93 : created, kgb
* 22Jul94 : broke out printday(); added "today only" option, kgb
* 22Jul94 : added list directed I/O capability, kgb
* 08Feb02 : added WEB_IO as a "today only" option, kgb
*
*----------------------------------------------------------------------*/
month_t month;
/*----------------------------------------------------------------------*
* begin code *
*----------------------------------------------------------------------*/
if (info->today_only < 0) {
calhead(info);
for (month = JANUARY; month <= DECEMBER; month++) {
printmon(info,
cal,
month);
}
caltail(info);
}
else {
if (info->io_option == LIST_IO ||
info->io_option == TEXT_IO) {
printtxt1(info,
cal,
info->today_only);
}
else if (info->io_option == WEB_IO) {
printweb1(info,
cal,
info->today_only);
}
}
}