1 #ifndef __RC_UTILS_H
2 # define __RC_UTILS_H
3 /*!
4 *  \file rc-utils.h
5 *  \brief Pool of special functions necessary for managing
6 *  			the fixed dates header file.
7 */
8 /*
9 *  Copyright (c) 1994, 95, 96, 1997, 2000 Thomas Esken
10 *  Copyright (c) 2010, 2011, 2013 Free Software Foundation, Inc.
11 *
12 *  This software doesn't claim completeness, correctness or usability.
13 *  On principle I will not be liable for ANY damages or losses (implicit
14 *  or explicit), which result from using or handling my software.
15 *  If you use this software, you agree without any exception to this
16 *  agreement, which binds you LEGALLY !!
17 *
18 *  This program is free software; you can redistribute it and/or modify
19 *  it under the terms of the `GNU General Public License' as published by
20 *  the `Free Software Foundation'; either version 3, or (at your option)
21 *  any later version.
22 *
23 *  You should have received a copy of the `GNU General Public License'
24 *  along with this program; if not, write to the:
25 *
26 */
27 
28 
29 
30 /*
31 *  $Id: rc-utils.h 3.01 2000/06/14 03:00:01 tom Exp $
32 */
33 
34 
35 
36 /*
37 *  GLOBAL functions prototypes.
38 */
39 __BEGIN_DECLARATIONS
40 /*
41 ************************************************** Defined in `rc-utils.c'.
42 */
43 extern Bool
44   rc_valid_day __P_ ((const char *date_text,
45 		      const int day, const int month, const int year));
46 extern Bool
47   rc_valid_period __P_ ((char *date_text,
48 			 const int d,
49 			 const int m,
50 			 const int y,
51 			 const int incr_year, const int decr_year));
52 extern void rc_clean_flags __P_ ((void));
53 extern Line_struct *rc_get_date __P_ ((char *the_line,
54 				       Line_struct * lineptrs,
55 				       const Bool is_rc_file,
56 				       Bool * is_weekday_mode,
57 				       int *d,
58 				       int *m,
59 				       int *y,
60 				       int *n,
61 				       int *len,
62 				       char *hc,
63 				       int *hn,
64 				       int *hwd,
65 				       const char *filename,
66 				       const long line_number,
67 				       const char *line_buffer,
68 				       const Bool on_error_exit));
69 extern Bool
70   precomp_nth_wd __P_ ((int diff,
71 			const int wd,
72 			int *n,
73 			int *day,
74 			int *month, int *year, const Cmode_enum mode));
75 extern Bool
76   precomp_date __P_ ((int diff,
77 		      const int wd,
78 		      int *day,
79 		      int *month, const int year, const Cmode_enum mode));
80 extern void
81   set_dvar __P_ ((const char *line_buffer,
82 		  Line_struct * lineptrs,
83 		  const char *filename,
84 		  const long line_number, const Var_enum mode));
85 extern void
86   set_tvar __P_ ((const char *line_buffer,
87 		  const char *filename,
88 		  const long line_number, const Var_enum mode));
89 extern void
90   nth_weekday_of_month __P_ ((int *d,
91 			      int *m,
92 			      int *y, const int *n, Bool * is_weekday_mode));
93 extern Slint
94   d_between __P_ ((const int d1,
95 		   const int m1,
96 		   const int y1, const int d2, const int m2, const int y2));
97 extern Slint
98   w_between __P_ ((const int d1,
99 		   const int m1,
100 		   const int y1, const int d2, const int m2, const int y2));
101 extern Slint
102   m_between __P_ ((const int m1, const int y1, const int m2, const int y2));
103 extern void
104   manage_leap_day __P_ ((int *day,
105 			 int *month,
106 			 int year,
107 			 const char *line_buffer,
108 			 const char *filename, const long line_number));
109 extern char *biorhythm __P_ ((const Bool create_bar,
110 			      int axis_len,
111 			      char *string,
112 			      const int day,
113 			      const int month,
114 			      const int year,
115 			      const int birth_day,
116 			      const int birth_month,
117 			      const int birth_year,
118 			      const char *emo_text,
119 			      int *emo_phase,
120 			      int *emo_waxes,
121 			      const char *int_text,
122 			      int *int_phase,
123 			      int *int_waxes,
124 			      const char *phy_text,
125 			      int *phy_phase,
126 			      int *phy_waxes,
127 			      int *critical_day,
128 			      int *positive_day, int *negative_day));
129 extern double
130   compute_distance __P_ ((const Coor_struct * coor1,
131 			  const Coor_struct * coor2));
132 __END_DECLARATIONS
133 #endif /* __RC_UTILS_H */
134