|
@@ -55,6 +55,131 @@ int ttail_add_logfile(ttail_t*, const char*);
|
55
|
55
|
*/
|
56
|
56
|
int ttail_set_prefix(ttail_t*, const char*);
|
57
|
57
|
|
|
58
|
+/**@brief Set a date format
|
|
59
|
+ *
|
|
60
|
+ * The supported input field descriptors are listed below. In case a text string (such as the name
|
|
61
|
+ * of a day of the week or a month name) is to be matched, the comparison is case insensitive. In
|
|
62
|
+ * case a number is to be matched, leading zeros are permitted but not required.
|
|
63
|
+ *
|
|
64
|
+ * \%% The % character.
|
|
65
|
+ *
|
|
66
|
+ * \%a or %A
|
|
67
|
+ * The name of the day of the week according to the current locale, in abbreviated form or
|
|
68
|
+ * the full name.
|
|
69
|
+ *
|
|
70
|
+ * \%b or %B or %h
|
|
71
|
+ * The month name according to the current locale, in abbreviated form or the full name.
|
|
72
|
+ *
|
|
73
|
+ * \%c The date and time representation for the current locale.
|
|
74
|
+ *
|
|
75
|
+ * \%C The century number (0-99).
|
|
76
|
+ *
|
|
77
|
+ * \%d or %e
|
|
78
|
+ * The day of month (1-31).
|
|
79
|
+ *
|
|
80
|
+ * \%D Equivalent to %m/%d/%y. (This is the American style date, very confusing to non-Ameri‐
|
|
81
|
+ * cans, especially since %d/%m/%y is widely used in Europe. The ISO 8601 standard format
|
|
82
|
+ * is %Y-%m-%d.)
|
|
83
|
+ *
|
|
84
|
+ * \%H The hour (0-23).
|
|
85
|
+ *
|
|
86
|
+ * \%I The hour on a 12-hour clock (1-12).
|
|
87
|
+ *
|
|
88
|
+ * \%j The day number in the year (1-366).
|
|
89
|
+ *
|
|
90
|
+ * \%m The month number (1-12).
|
|
91
|
+ *
|
|
92
|
+ * \%M The minute (0-59).
|
|
93
|
+ *
|
|
94
|
+ * \%n Arbitrary whitespace.
|
|
95
|
+ *
|
|
96
|
+ * \%p The locale's equivalent of AM or PM. (Note: there may be none.)
|
|
97
|
+ *
|
|
98
|
+ * \%r The 12-hour clock time (using the locale's AM or PM). In the POSIX locale equivalent to
|
|
99
|
+ * \%I:%M:%S %p. If t_fmt_ampm is empty in the LC_TIME part of the current locale, then the
|
|
100
|
+ * behavior is undefined.
|
|
101
|
+ *
|
|
102
|
+ * \%R Equivalent to %H:%M.
|
|
103
|
+ *
|
|
104
|
+ * \%S The second (0-60; 60 may occur for leap seconds; earlier also 61 was allowed).
|
|
105
|
+ *
|
|
106
|
+ * \%t Arbitrary whitespace.
|
|
107
|
+ *
|
|
108
|
+ * \%T Equivalent to %H:%M:%S.
|
|
109
|
+ *
|
|
110
|
+ * \%U The week number with Sunday the first day of the week (0-53). The first Sunday of Janu‐
|
|
111
|
+ * ary is the first day of week 1.
|
|
112
|
+ *
|
|
113
|
+ * \%w The ordinal number of the day of the week (0-6), with Sunday = 0.
|
|
114
|
+ *
|
|
115
|
+ * \%W The week number with Monday the first day of the week (0-53). The first Monday of Janu‐
|
|
116
|
+ * ary is the first day of week 1.
|
|
117
|
+ *
|
|
118
|
+ * \%x The date, using the locale's date format.
|
|
119
|
+ *
|
|
120
|
+ * \%X The time, using the locale's time format.
|
|
121
|
+ *
|
|
122
|
+ * \%y The year within century (0-99). When a century is not otherwise specified, values in the
|
|
123
|
+ * range 69-99 refer to years in the twentieth century (1969-1999); values in the range
|
|
124
|
+ * 00-68 refer to years in the twenty-first century (2000-2068).
|
|
125
|
+ *
|
|
126
|
+ * \%Y The year, including century (for example, 1991).
|
|
127
|
+ *
|
|
128
|
+ * Some field descriptors can be modified by the E or O modifier characters to indicate that an
|
|
129
|
+ * alternative format or specification should be used. If the alternative format or specification
|
|
130
|
+ * does not exist in the current locale, the unmodified field descriptor is used.
|
|
131
|
+ *
|
|
132
|
+ *
|
|
133
|
+ * The E modifier specifies that the input string may contain alternative locale-dependent versions
|
|
134
|
+ * of the date and time representation:
|
|
135
|
+ *
|
|
136
|
+ * \%Ec The locale's alternative date and time representation.
|
|
137
|
+ *
|
|
138
|
+ * \%EC The name of the base year (period) in the locale's alternative representation.
|
|
139
|
+ *
|
|
140
|
+ * \%Ex The locale's alternative date representation.
|
|
141
|
+ *
|
|
142
|
+ * \%EX The locale's alternative time representation.
|
|
143
|
+ *
|
|
144
|
+ * \%Ey The offset from %EC (year only) in the locale's alternative representation.
|
|
145
|
+ *
|
|
146
|
+ * \%EY The full alternative year representation.
|
|
147
|
+ *
|
|
148
|
+ * The O modifier specifies that the numerical input may be in an alternative locale-dependent for‐
|
|
149
|
+ * mat:
|
|
150
|
+ *
|
|
151
|
+ * \%Od or %Oe
|
|
152
|
+ * The day of the month using the locale's alternative numeric symbols; leading zeros are
|
|
153
|
+ * permitted but not required.
|
|
154
|
+ *
|
|
155
|
+ * \%OH The hour (24-hour clock) using the locale's alternative numeric symbols.
|
|
156
|
+ *
|
|
157
|
+ * \%OI The hour (12-hour clock) using the locale's alternative numeric symbols.
|
|
158
|
+ *
|
|
159
|
+ * \%Om The month using the locale's alternative numeric symbols.
|
|
160
|
+ *
|
|
161
|
+ * \%OM The minutes using the locale's alternative numeric symbols.
|
|
162
|
+ *
|
|
163
|
+ * \%OS The seconds using the locale's alternative numeric symbols.
|
|
164
|
+ *
|
|
165
|
+ * \%OU The week number of the year (Sunday as the first day of the week) using the locale's
|
|
166
|
+ * alternative numeric symbols.
|
|
167
|
+ *
|
|
168
|
+ * \%Ow The ordinal number of the day of the week (Sunday=0),
|
|
169
|
+ * using the locale's alternative numeric symbols.
|
|
170
|
+ *
|
|
171
|
+ * \%OW The week number of the year (Monday as the first day of the week) using the locale's
|
|
172
|
+ * alternative numeric symbols.
|
|
173
|
+ *
|
|
174
|
+ * \%Oy The year (offset from %C) using the locale's alternative numeric symbols.
|
|
175
|
+ *
|
|
176
|
+ *
|
|
177
|
+ *@param ttail_t*
|
|
178
|
+ *@param const char * format
|
|
179
|
+ *@return 0 if no errors 1 if allready set -1 if compilation fails
|
|
180
|
+ */
|
|
181
|
+int ttail_set_fmt(ttail_t*, const char*);
|
|
182
|
+
|
58
|
183
|
/**@brief Set dates min/max
|
59
|
184
|
*
|
60
|
185
|
*After the call dates are free and set to NULL except if error
|