diff options
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | ChangeLog.ja | 9 | ||||
-rw-r--r-- | src/jpilot.c | 37 | ||||
-rw-r--r-- | src/procmime.c | 18 |
4 files changed, 51 insertions, 40 deletions
@@ -1,14 +1,23 @@ 2005-01-26 - src/compose.c - src/folder.c - src/prefs.c - src/codeconv.[ch] - src/imap.c - src/xml.c - src/addrbook.c - src/addrindex.c: added constant C_INTERNAL and CS_INTERNAL which - replace conv_get_internal_charset_str(). + * src/procmime.c: + procmime_scan_content_type() + procmime_scan_content_disposition(): removed raw ISO-2022-JP to + EUC-JP conversion. + * src/jpilot.c: use conv_codeset_strdup() instead of + conv_sjistodisp(). + +2005-01-26 + + * src/compose.c + src/folder.c + src/prefs.c + src/codeconv.[ch] + src/imap.c + src/xml.c + src/addrbook.c + src/addrindex.c: added constant C_INTERNAL and CS_INTERNAL which + replace conv_get_internal_charset_str(). 2005-01-25 diff --git a/ChangeLog.ja b/ChangeLog.ja index a02402cf..53befcbf 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,14 @@ 2005-01-26 + * src/procmime.c: + procmime_scan_content_type() + procmime_scan_content_disposition(): 生の ISO-2022-JP から EUC-JP + への変換を削除。 + * src/jpilot.c: conv_sjistodisp() の代わりに conv_codeset_strdup() + を使用。 + +2005-01-26 + * src/compose.c src/folder.c src/prefs.c diff --git a/src/jpilot.c b/src/jpilot.c index 4bc6aa6d..624d0f4f 100644 --- a/src/jpilot.c +++ b/src/jpilot.c @@ -53,6 +53,7 @@ #include "addrcache.h" #include "jpilot.h" #include "codeconv.h" +#include "utils.h" #define JPILOT_DBHOME_DIR ".jpilot" #define JPILOT_DBHOME_FILE "AddressDB.pdb" @@ -1048,8 +1049,8 @@ static void jpilot_load_address( JPilotFile *pilotFile, buf_rec *buf, ItemFolder if( convert_charcode ) { gchar *nameConv; - nameConv = g_strdup( fullName ); - conv_sjistodisp( fullName, FULLNAME_BUFSIZE, nameConv ); + nameConv = conv_codeset_strdup( fullName, CS_SHIFT_JIS, CS_INTERNAL ); + strncpy2( fullName, nameConv, FULLNAME_BUFSIZE ); g_free( nameConv ); } @@ -1096,7 +1097,6 @@ static void jpilot_load_address( JPilotFile *pilotFile, buf_rec *buf, ItemFolder /* Add entry for each custom label */ node = pilotFile->labelInd; while( node ) { - gchar convertBuff[ JPILOT_LEN_LABEL ]; gint ind; ind = GPOINTER_TO_INT( node->data ); @@ -1115,8 +1115,10 @@ static void jpilot_load_address( JPilotFile *pilotFile, buf_rec *buf, ItemFolder addritem_email_set_address( email, bufEMail ); if( convert_charcode ) { - conv_sjistodisp( convertBuff, JPILOT_LEN_LABEL, ai->labels[ind] ); + gchar *convertBuff; + convertBuff = conv_codeset_strdup( ai->labels[ind], CS_SHIFT_JIS, CS_INTERNAL ); addritem_email_set_remarks( email, convertBuff ); + g_free( convertBuff ); } else { addritem_email_set_remarks( email, ai->labels[ind] ); @@ -1283,7 +1285,9 @@ static gboolean jpilot_setup_labels( JPilotFile *pilotFile ) { gchar convertBuff[ JPILOT_LEN_LABEL ]; if( convert_charcode ) { - conv_sjistodisp( convertBuff, JPILOT_LEN_LABEL, labelName ); + labelName = conv_codeset_strdup( labelName, CS_SHIFT_JIS, CS_INTERNAL ); + strncpy2( convertBuff, labelName, JPILOT_LEN_LABEL ); + g_free( labelName ); labelName = convertBuff; } @@ -1312,14 +1316,15 @@ GList *jpilot_load_label( JPilotFile *pilotFile, GList *labelList ) { struct AddressAppInfo *ai = & pilotFile->addrInfo; for( i = 0; i < JPILOT_NUM_LABELS; i++ ) { gchar *labelName = ai->labels[i]; - gchar convertBuff[JPILOT_LEN_LABEL]; if( labelName ) { if( convert_charcode ) { - conv_sjistodisp( convertBuff, JPILOT_LEN_LABEL, labelName ); - labelName = convertBuff; + labelName = conv_codeset_strdup( labelName, CS_SHIFT_JIS, CS_INTERNAL ); } - labelList = g_list_append( labelList, g_strdup( labelName ) ); + else { + labelName = g_strdup( labelName ); + } + labelList = g_list_append( labelList, labelName ); } else { labelList = g_list_append( labelList, g_strdup( "" ) ); @@ -1381,7 +1386,6 @@ GList *jpilot_load_phone_label( JPilotFile *pilotFile, GList *labelList ) { */ GList *jpilot_load_custom_label( JPilotFile *pilotFile, GList *labelList ) { gint i; - char convertBuff[JPILOT_LEN_LABEL]; g_return_val_if_fail( pilotFile != NULL, NULL ); @@ -1394,10 +1398,12 @@ GList *jpilot_load_custom_label( JPilotFile *pilotFile, GList *labelList ) { g_strchug( labelName ); if( *labelName != '\0' ) { if( convert_charcode ) { - conv_sjistodisp( convertBuff, JPILOT_LEN_LABEL, labelName ); - labelName = convertBuff; + labelName = conv_codeset_strdup( labelName, CS_SHIFT_JIS, CS_INTERNAL ); + } + else { + labelName = g_strdup( labelName ); } - labelList = g_list_append( labelList, g_strdup( labelName ) ); + labelList = g_list_append( labelList, labelName ); } } } @@ -1442,9 +1448,10 @@ static void jpilot_build_category_list( JPilotFile *pilotFile ) { ItemFolder *folder = addritem_create_item_folder(); if( convert_charcode ) { - gchar catName[ JPILOT_LEN_CATEG ]; - conv_sjistodisp( catName, JPILOT_LEN_CATEG, cat->name[i] ); + gchar *catName; + catName = conv_codeset_strdup( cat->name[i], CS_SHIFT_JIS, CS_INTERNAL ); addritem_folder_set_name( folder, catName ); + g_free( catName ); } else { addritem_folder_set_name( folder, cat->name[i] ); diff --git a/src/procmime.c b/src/procmime.c index eb6225df..008bd10e 100644 --- a/src/procmime.c +++ b/src/procmime.c @@ -349,14 +349,7 @@ void procmime_scan_content_type(MimeInfo *mimeinfo, const gchar *content_type) gchar *delim, *p, *cnttype; gchar *buf; - if (conv_get_locale_charset() == C_EUC_JP && - strchr(content_type, '\033')) { - gint len; - len = strlen(content_type) * 2 + 1; - Xalloca(buf, len, return); - conv_jistoeuc(buf, len, content_type); - } else - Xstrdup_a(buf, content_type, return); + Xstrdup_a(buf, content_type, return); g_free(mimeinfo->content_type); g_free(mimeinfo->charset); @@ -423,14 +416,7 @@ void procmime_scan_content_disposition(MimeInfo *mimeinfo, gchar *delim, *p, *dispos; gchar *buf; - if (conv_get_locale_charset() == C_EUC_JP && - strchr(content_disposition, '\033')) { - gint len; - len = strlen(content_disposition) * 2 + 1; - Xalloca(buf, len, return); - conv_jistoeuc(buf, len, content_disposition); - } else - Xstrdup_a(buf, content_disposition, return); + Xstrdup_a(buf, content_disposition, return); if ((delim = strchr(buf, ';'))) *delim = '\0'; mimeinfo->content_disposition = dispos = g_strdup(g_strstrip(buf)); |