1 diff -u -r ../upstream.git/apt-pkg/contrib/strutl.cc ./apt-pkg/contrib/strutl.cc
2 --- ../upstream.git/apt-pkg/contrib/strutl.cc 2014-06-18 13:17:17.000000000 +0200
3 +++ ./apt-pkg/contrib/strutl.cc 2014-07-01 16:49:25.305832759 +0200
15 // UTF8ToCodeset - Convert some UTF-8 string for some codeset /*{{{*/
16 // ---------------------------------------------------------------------
17 /* This is handy to use before display some information for enduser */
19 bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest)
28 // strstrip - Remove white space from the front and back of a string /*{{{*/
29 // ---------------------------------------------------------------------
32 if (ASize < 100 && I != 0)
34 - sprintf(S,"%'.1f %c",ASize,Ext[I]);
35 + sprintf(S,"%.1f %c",ASize,Ext[I]);
41 - sprintf(S,"%'.0f %c",ASize,Ext[I]);
42 + sprintf(S,"%.0f %c",ASize,Ext[I]);
47 setlocale (LC_ALL,"C");
49 // Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
50 - (strptime(str, "%a, %d %b %Y %H:%M:%S %Z", &Tm) == NULL &&
51 + (strptime(str, "%a, %d %b %Y %H:%M:%S", &Tm) == NULL &&
52 // Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
53 - strptime(str, "%A, %d-%b-%y %H:%M:%S %Z", &Tm) == NULL &&
54 + strptime(str, "%A, %d-%b-%y %H:%M:%S", &Tm) == NULL &&
55 // Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
56 strptime(str, "%a %b %d %H:%M:%S %Y", &Tm) == NULL);
57 setlocale (LC_ALL,"");
58 - if (invalid == true)
59 + if (invalid == true) {
60 + if (str != NULL && strlen(str) > 1) printf("Invalid time str '%s'\n", str);