~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle/my_time.c

  • Committer: Patrick Galbraith
  • Date: 2008-07-16 18:48:24 UTC
  • mto: (77.3.28 glibclient)
  • mto: This revision was merged to the branch mainline in revision 176.
  • Revision ID: patg@ishvara-20080716184824-nyd9po8rwk00l2qu
Dar, I forgot to commit this earlier.

* Removed my_sprintf from the files below
* Fixed some small issues that cause compile to fail (pedantic picky-ousity)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1010
1010
int my_time_to_str(const MYSQL_TIME *l_time, char *to)
1011
1011
{
1012
1012
  uint extra_hours= 0;
1013
 
  return my_sprintf(to, (to, "%s%02u:%02u:%02u",
 
1013
  return sprintf(to, "%s%02u:%02u:%02u",
1014
1014
                         (l_time->neg ? "-" : ""),
1015
1015
                         extra_hours+ l_time->hour,
1016
1016
                         l_time->minute,
1017
 
                         l_time->second));
 
1017
                         l_time->second);
1018
1018
}
1019
1019
 
1020
1020
int my_date_to_str(const MYSQL_TIME *l_time, char *to)
1021
1021
{
1022
 
  return my_sprintf(to, (to, "%04u-%02u-%02u",
 
1022
  return sprintf(to, "%04u-%02u-%02u",
1023
1023
                         l_time->year,
1024
1024
                         l_time->month,
1025
 
                         l_time->day));
 
1025
                         l_time->day);
1026
1026
}
1027
1027
 
1028
1028
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to)
1029
1029
{
1030
 
  return my_sprintf(to, (to, "%04u-%02u-%02u %02u:%02u:%02u",
 
1030
  return sprintf(to, "%04u-%02u-%02u %02u:%02u:%02u",
1031
1031
                         l_time->year,
1032
1032
                         l_time->month,
1033
1033
                         l_time->day,
1034
1034
                         l_time->hour,
1035
1035
                         l_time->minute,
1036
 
                         l_time->second));
 
1036
                         l_time->second);
1037
1037
}
1038
1038
 
1039
1039