Changeset 12221
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/msgwin.c
r12090 r12221 119 119 if( pinned_to_new ) 120 120 scroll_to_bottom( data ); 121 } 122 123 /* similar to asctime, but is utf8-clean */ 124 static char* 125 gtr_localtime( time_t time ) 126 { 127 char buf[256], *eoln; 128 const struct tm tm = *localtime( &time ); 129 130 g_strlcpy( buf, asctime( &tm ), sizeof( buf ) ); 131 if( ( eoln = strchr( buf, '\n' ) ) ) 132 *eoln = '\0'; 133 134 return g_locale_to_utf8( buf, -1, NULL, NULL, NULL ); 121 135 } 122 136 -
trunk/gtk/util.c
r12220 r12221 211 211 212 212 return buf; 213 }214 215 char *216 gtr_localtime( time_t time )217 {218 char buf[256], *eoln;219 const struct tm tm = *localtime( &time );220 221 g_strlcpy( buf, asctime( &tm ), sizeof( buf ) );222 if( ( eoln = strchr( buf, '\n' ) ) )223 *eoln = '\0';224 225 return g_locale_to_utf8( buf, -1, NULL, NULL, NULL );226 213 } 227 214 -
trunk/gtk/util.h
r12220 r12221 63 63 /* return a human-readable string for the time given in seconds. */ 64 64 char* tr_strltime( char * buf, int secs, size_t buflen ); 65 66 /* similar to asctime, but is utf8-clean */67 char* gtr_localtime( time_t time );68 69 65 70 66 int gtr_compare_double( const double a, const double b, int decimal_places );
Note: See TracChangeset
for help on using the changeset viewer.