aboutsummaryrefslogtreecommitdiffstats
path: root/src/strftime.c
diff options
context:
space:
mode:
authorDan Nicolaescu2010-07-04 00:50:25 -0700
committerDan Nicolaescu2010-07-04 00:50:25 -0700
commit971de7fb158335fbda39525feb2d7776a26bc030 (patch)
tree605333d85f16e35bb06baffcb66ac49f4ec0dce9 /src/strftime.c
parentb8463cbfbe2c5183cf40772df2746e58b787ddeb (diff)
downloademacs-971de7fb158335fbda39525feb2d7776a26bc030.tar.gz
emacs-971de7fb158335fbda39525feb2d7776a26bc030.zip
Convert (most) functions in src to standard C.
* src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
Diffstat (limited to 'src/strftime.c')
-rw-r--r--src/strftime.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/src/strftime.c b/src/strftime.c
index a7617427793..e07d89fb509 100644
--- a/src/strftime.c
+++ b/src/strftime.c
@@ -367,11 +367,7 @@ static CHAR_T *memcpy_lowcase (CHAR_T *dest, const CHAR_T *src,
367 size_t len LOCALE_PARAM_PROTO); 367 size_t len LOCALE_PARAM_PROTO);
368 368
369static CHAR_T * 369static CHAR_T *
370memcpy_lowcase (dest, src, len LOCALE_PARAM) 370memcpy_lowcase (char *dest, const char *src, size_t len)
371 CHAR_T *dest;
372 const CHAR_T *src;
373 size_t len;
374 LOCALE_PARAM_DECL
375{ 371{
376 while (len-- > 0) 372 while (len-- > 0)
377 dest[len] = TOLOWER ((UCHAR_T) src[len], loc); 373 dest[len] = TOLOWER ((UCHAR_T) src[len], loc);
@@ -382,11 +378,7 @@ static CHAR_T *memcpy_uppcase (CHAR_T *dest, const CHAR_T *src,
382 size_t len LOCALE_PARAM_PROTO); 378 size_t len LOCALE_PARAM_PROTO);
383 379
384static CHAR_T * 380static CHAR_T *
385memcpy_uppcase (dest, src, len LOCALE_PARAM) 381memcpy_uppcase (char *dest, const char *src, size_t len)
386 CHAR_T *dest;
387 const CHAR_T *src;
388 size_t len;
389 LOCALE_PARAM_DECL
390{ 382{
391 while (len-- > 0) 383 while (len-- > 0)
392 dest[len] = TOUPPER ((UCHAR_T) src[len], loc); 384 dest[len] = TOUPPER ((UCHAR_T) src[len], loc);
@@ -437,9 +429,7 @@ static int iso_week_days (int, int);
437__inline__ 429__inline__
438#endif 430#endif
439static int 431static int
440iso_week_days (yday, wday) 432iso_week_days (int yday, int wday)
441 int yday;
442 int wday;
443{ 433{
444 /* Add enough to the first operand of % to make it nonnegative. */ 434 /* Add enough to the first operand of % to make it nonnegative. */
445 int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7; 435 int big_enough_multiple_of_7 = (-YDAY_MINIMUM / 7 + 2) * 7;
@@ -1474,12 +1464,7 @@ libc_hidden_def (my_strftime)
1474/* For Emacs we have a separate interface which corresponds to the normal 1464/* For Emacs we have a separate interface which corresponds to the normal
1475 strftime function plus the ut argument, but without the ns argument. */ 1465 strftime function plus the ut argument, but without the ns argument. */
1476size_t 1466size_t
1477emacs_strftimeu (s, maxsize, format, tp, ut) 1467emacs_strftimeu (char *s, size_t maxsize, const char *format, const struct tm *tp, int ut)
1478 char *s;
1479 size_t maxsize;
1480 const char *format;
1481 const struct tm *tp;
1482 int ut;
1483{ 1468{
1484 return my_strftime (s, maxsize, format, tp, ut, 0); 1469 return my_strftime (s, maxsize, format, tp, ut, 0);
1485} 1470}