MCPcopy Create free account
hub / github.com/eggert/tz / display

Function display

date.c:162–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162static void
163display(char const *format, time_t now)
164{
165 struct tm *tmp;
166
167 tmp = localtime(&now);
168 if (!tmp) {
169 fprintf(stderr,
170 _("date: error: time out of range\n"));
171 errensure();
172 return;
173 }
174 timeout(stdout, format, tmp);
175 putchar('\n');
176 fflush(stdout);
177 fflush(stderr);
178 if (ferror(stdout) || ferror(stderr)) {
179 fprintf(stderr,
180 _("date: error: couldn't write results\n"));
181 errensure();
182 }
183}
184
185static void
186timeout(FILE *fp, char const *format, struct tm const *tmp)

Callers 1

mainFunction · 0.85

Calls 3

localtimeFunction · 0.85
errensureFunction · 0.85
timeoutFunction · 0.85

Tested by

no test coverage detected