~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/mf_getdate.c

  • Committer: Monty Taylor
  • Date: 2008-10-16 06:32:30 UTC
  • mto: (511.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 521.
  • Revision ID: monty@inaugust.com-20081016063230-4brxsra0qsmsg84q
Added -Wunused-macros.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
/* Get date in a printable form: yyyy-mm-dd hh:mm:ss */
17
17
 
18
18
#include "mysys_priv.h"
19
 
#include <m_string.h>
 
19
#include <mystrings/m_string.h>
20
20
 
21
21
/*
22
22
  get date as string
67
67
             start_time->tm_mon+1,
68
68
             start_time->tm_mday);
69
69
   if (flag & GETDATE_DATE_TIME)
70
 
     sprintf(strend(to),
 
70
     sprintf(strchr(to, '\0'),
71
71
             ((flag & GETDATE_FIXEDLENGTH) ?
72
72
              " %02d:%02d:%02d" : " %2d:%02d:%02d"),
73
73
             start_time->tm_hour,
74
74
             start_time->tm_min,
75
75
             start_time->tm_sec);
76
76
   else if (flag & GETDATE_HHMMSSTIME)
77
 
     sprintf(strend(to),"%02d%02d%02d",
 
77
     sprintf(strchr(to, '\0'),"%02d%02d%02d",
78
78
             start_time->tm_hour,
79
79
             start_time->tm_min,
80
80
             start_time->tm_sec);