change comment format
authorPaul Mangan <paul@claws-mail.org>
Thu, 27 Sep 2001 08:16:30 +0000 (08:16 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 27 Sep 2001 08:16:30 +0000 (08:16 +0000)
ChangeLog.claws
configure.in
src/addrbook.c
src/addrcache.c
src/addritem.c
src/jpilot.c

index ae8941985ae38d091fb6855abfbf5bad0f4e0e17..70dcdf5e0aceb89523c1bb025d305b38390ce4f9 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-27 [paul]      0.6.2claws9
+
+       * src/addrbook.c, src/addrcache.c, src/addritem.c, src/jpilot.c
+               replace '// comments' with '/* comments */' to prevent
+               some compiler warnings 
+
+       * sync with sylpheed 0.6.2cvs6
+
 2001-09-26 [alfons]    0.6.2claws8
 
        * src/messageview.c
index 7f8af1eda8990ce5c55f414d4fc531a55b7853fd..ddf7991943c14f2c330c7aa57c235f0a56e1e24d 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=6
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws8
+EXTRA_VERSION=claws9
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl
index e6001a1f828f0eaeb206204ff5789a766604d610..8f1e96df0e58f4425c9fa821e08f0ec5bbe0a88e 100644 (file)
@@ -156,13 +156,13 @@ static void addrcache_free_item_hash( GHashTable *table ) {
 void addrbook_empty_book( AddressBookFile *book ) {
        g_return_if_fail( book != NULL );
 
-       // Free up folders and hash table
+       /* Free up folders and hash table */
        addrcache_clear( book->addressCache );
 
        g_list_free( book->tempList );
        book->tempList = NULL;
 
-       // Reset to initial state
+       /* Reset to initial state */
        book->retVal = MGU_SUCCESS;
        book->tempHash = NULL;
        book->readFlag = FALSE;
@@ -184,7 +184,7 @@ void addrbook_free_book( AddressBookFile *book ) {
        book->path = NULL;
        book->fileName = NULL;
 
-       // Free up folders and hash table
+       /* Free up folders and hash table */
        addrcache_free( book->addressCache );
        book->addressCache = NULL;
 
@@ -328,7 +328,7 @@ ItemEMail *addrbook_person_remove_email( AddressBookFile *book, ItemPerson *pers
 * ***********************************************************************
 */
 
-// Element tag names
+/* Element tag names */
 #define AB_ELTAG_ADDRESS         "address"
 #define AB_ELTAG_ATTRIBUTE       "attribute"
 #define AB_ELTAG_ATTRIBUTE_LIST  "attribute-list"
@@ -356,7 +356,7 @@ ItemEMail *addrbook_person_remove_email( AddressBookFile *book, ItemPerson *pers
 #define AB_ATTAG_EID             "eid"
 #define AB_ATTAG_PID             "pid"
 
-// Attribute values
+/* Attribute values */
 #define AB_ATTAG_VAL_PERSON      "person"
 #define AB_ATTAG_VAL_GROUP       "group"
 #define AB_ATTAG_VAL_FOLDER      "folder"
@@ -508,7 +508,7 @@ static void addrbook_parse_person( AddressBookFile *book, XMLFile *file ) {
                }
                attr = g_list_next( attr );
        }
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ADDRESS_LIST ) ) {
@@ -517,7 +517,7 @@ static void addrbook_parse_person( AddressBookFile *book, XMLFile *file ) {
                        addrcache_hash_add_person( book->addressCache, person );
                }
        }
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ATTRIBUTE_LIST ) ) {
@@ -606,7 +606,7 @@ static void addrbook_parse_group( AddressBookFile *book, XMLFile *file ) {
                }
                attr = g_list_next( attr );
        }
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_MEMBER_LIST ) ) {
@@ -691,14 +691,14 @@ static void addrbook_parse_folder( AddressBookFile *book, XMLFile *file ) {
                }
                attr = g_list_next( attr );
        }
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ITEM_LIST ) ) {
                if( folder ) {
                        if( addrcache_hash_add_folder( book->addressCache, folder ) ) {
                                book->tempList = g_list_append( book->tempList, folder );
-                               ADDRITEM_PARENT(folder) = NULL; // We will resolve folder later
+                               ADDRITEM_PARENT(folder) = NULL; /* We will resolve folder later */
                        }
                }
                addrbook_parse_folder_list( book, file, folder );
@@ -738,7 +738,7 @@ static gboolean addrbook_read_tree( AddressBookFile *book, XMLFile *file ) {
        retVal = TRUE;
        for (;;) {
                if (! file->level ) break;
-               // Get next item tag (person, group or folder)
+               /* Get next item tag (person, group or folder) */
                if( xml_parse_next_tag( file ) ) {
                        longjmp( book->jumper, 1 );
                }
@@ -808,19 +808,19 @@ static void addrbook_resolve_folder_items( AddressBookFile *book ) {
                                        folder->listGroup = g_list_append( folder->listGroup, item );
                                        ADDRITEM_PARENT(item) = ADDRITEM_OBJECT(folder);
                                }
-                               // Replace data with pointer to item
+                               /* Replace data with pointer to item */
                                g_free( uid );
                                node->data = aio;
                        }
                        else {
-                               // Not found, append to remove list.
+                               /* Not found, append to remove list. */
                                listRemove = g_list_append( listRemove, uid );
                        }
                        node = g_list_next( node );
                }
                rootFolder->listFolder = g_list_append( rootFolder->listFolder, folder );
 
-               // Process remove list
+               /* Process remove list */
                node = listRemove;
                while( node ) {
                        gchar *uid = node->data;
@@ -832,23 +832,23 @@ static void addrbook_resolve_folder_items( AddressBookFile *book ) {
                nodeFolder = g_list_next( nodeFolder );
        }
 
-       // Remove folders with parents.
+       /* Remove folders with parents. */
        listRemove = NULL;
        node = rootFolder->listFolder;
        while( node ) {
                ItemFolder *folder = ( ItemFolder * ) node->data;
                if( ADDRITEM_PARENT(folder) ) {
-                       // Remove folders with parents
+                       /* Remove folders with parents */
                        listRemove = g_list_append( listRemove, folder );
                }
                else {
-                       // Add to root folder
+                       /* Add to root folder */
                        ADDRITEM_PARENT(folder) = ADDRITEM_OBJECT(book->addressCache->rootFolder);
                }
                node = g_list_next( node );
        }
 
-       // Process remove list
+       /* Process remove list */
        node = listRemove;
        while( node ) {
                rootFolder->listFolder = g_list_remove( rootFolder->listFolder, node->data );
@@ -856,10 +856,10 @@ static void addrbook_resolve_folder_items( AddressBookFile *book ) {
        }
        g_list_free( listRemove );
 
-       // Move all unparented persons and groups into root folder
+       /* Move all unparented persons and groups into root folder */
        g_hash_table_foreach( book->addressCache->itemHash, addrbook_res_items_vis, book );
 
-       // Free up some more
+       /* Free up some more */
        nodeFolder = book->tempList;
        while( nodeFolder ) {
                ItemFolder *folder = nodeFolder->data;
@@ -890,7 +890,7 @@ gint addrbook_read_data( AddressBookFile *book ) {
        if( file ) {
                book->tempList = NULL;
 
-               // Trap for parsing errors.
+               /* Trap for parsing errors. */
                if( setjmp( book->jumper ) ) {
                        xml_close_file( file );
                        return book->retVal;
@@ -898,7 +898,7 @@ gint addrbook_read_data( AddressBookFile *book ) {
                addrbook_read_tree( book, file );
                xml_close_file( file );
 
-               // Resolve folder items
+               /* Resolve folder items */
                addrbook_resolve_folder_items( book );
                book->tempList = NULL;
                book->readFlag = TRUE;
@@ -950,7 +950,7 @@ static void addrbook_write_item_person_vis( gpointer key, gpointer value, gpoint
                        addrbook_write_attr( fp, AB_ATTAG_COMMON_NAME, ADDRITEM_NAME(person) );
                        fputs( " >\n", fp);
 
-                       // Output email addresses
+                       /* Output email addresses */
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_ADDRESS_LIST );
                        fputs( ">\n", fp );
                        node = person->listEMail;
@@ -966,7 +966,7 @@ static void addrbook_write_item_person_vis( gpointer key, gpointer value, gpoint
                        }
                        addrbook_write_elem_e( fp, 2, AB_ELTAG_ADDRESS_LIST );
 
-                       // Output user attributes
+                       /* Output user attributes */
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_ATTRIBUTE_LIST );
                        fputs( ">\n", fp );
                        node = person->listAttrib;
@@ -1002,7 +1002,7 @@ static void addrbook_write_folder_group( ItemFolder *parent, FILE *fp ) {
                        addrbook_write_attr( fp, AB_ATTAG_REMARKS, group->remarks );
                        fputs( " >\n", fp );
 
-                       // Output email address links
+                       /* Output email address links */
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_MEMBER_LIST );
                        fputs( ">\n", fp );
                        node = group->listEMail;
@@ -1046,7 +1046,7 @@ static void addrbook_write_item_group_vis( gpointer key, gpointer value, gpointe
                        addrbook_write_attr( fp, AB_ATTAG_REMARKS, group->remarks );
                        fputs( " >\n", fp );
 
-                       // Output email address links
+                       /* Output email address links */
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_MEMBER_LIST );
                        fputs( ">\n", fp );
                        node = group->listEMail;
@@ -1084,7 +1084,7 @@ static void addrbook_write_folder_folder( ItemFolder *parent, FILE *fp ) {
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_ITEM_LIST );
                        fputs( ">\n", fp );
 
-                       // Output persons
+                       /* Output persons */
                        node = folder->listPerson;
                        while ( node ) {
                                ItemPerson *item = node->data;
@@ -1095,7 +1095,7 @@ static void addrbook_write_folder_folder( ItemFolder *parent, FILE *fp ) {
                                node = g_list_next( node );
                        }
 
-                       // Output groups
+                       /* Output groups */
                        node = folder->listGroup;
                        while ( node ) {
                                ItemGroup *item = node->data;
@@ -1106,7 +1106,7 @@ static void addrbook_write_folder_folder( ItemFolder *parent, FILE *fp ) {
                                node = g_list_next( node );
                        }
 
-                       // Output folders
+                       /* Output folders */
                        node = folder->listFolder;
                        while ( node ) {
                                ItemFolder *item = node->data;
@@ -1143,7 +1143,7 @@ static void addrbook_write_item_folder_vis( gpointer key, gpointer value, gpoint
                        addrbook_write_elem_s( fp, 2, AB_ELTAG_ITEM_LIST );
                        fputs( ">\n", fp );
 
-                       // Output persons
+                       /* Output persons */
                        node = folder->listPerson;
                        while ( node ) {
                                ItemPerson *item = node->data;
@@ -1154,7 +1154,7 @@ static void addrbook_write_item_folder_vis( gpointer key, gpointer value, gpoint
                                node = g_list_next( node );
                        }
 
-                       // Output groups
+                       /* Output groups */
                        node = folder->listGroup;
                        while ( node ) {
                                ItemGroup *item = node->data;
@@ -1165,7 +1165,7 @@ static void addrbook_write_item_folder_vis( gpointer key, gpointer value, gpoint
                                node = g_list_next( node );
                        }
 
-                       // Output folders
+                       /* Output folders */
                        node = folder->listFolder;
                        while ( node ) {
                                ItemFolder *item = node->data;
@@ -1215,16 +1215,16 @@ gint addrbook_write_to( AddressBookFile *book, gchar *newFile ) {
                addrbook_write_attr( fp, AB_ATTAG_NAME, book->name );
                fputs( " >\n", fp );
 
-               // Output all persons
+               /* Output all persons */
                g_hash_table_foreach( book->addressCache->itemHash, addrbook_write_item_person_vis, fp );
 
-               // Output all groups
+               /* Output all groups */
                g_hash_table_foreach( book->addressCache->itemHash, addrbook_write_item_group_vis, fp );
-               // addrbook_write_folder_group( book->rootFolder, fp );
+               /* addrbook_write_folder_group( book->rootFolder, fp ); */
 
-               // Output all folders
+               /* Output all folders */
                g_hash_table_foreach( book->addressCache->itemHash, addrbook_write_item_folder_vis, fp );
-               // addrbook_write_folder_folder( book->rootFolder, fp );
+               /* addrbook_write_folder_folder( book->rootFolder, fp ); */
 
                addrbook_write_elem_e( fp, 0, AB_ELTAG_ADDRESS_BOOK );
                book->retVal = MGU_SUCCESS;
@@ -1333,15 +1333,15 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
        g_return_if_fail( book != NULL );
        g_return_if_fail( person != NULL );
 
-       // Remember old list
+       /* Remember old list */
        oldData = person->listEMail;
 
-       // Attach new address list to person.
+       /* Attach new address list to person. */
        node = listEMail;
        while( node ) {
                ItemEMail *email = node->data;
                if( ADDRITEM_ID(email) == NULL ) {
-                       // Allocate an ID
+                       /* Allocate an ID */
                        addrcache_id_email( book->addressCache, email );
                }
                ADDRITEM_PARENT(email) = ADDRITEM_OBJECT(person);
@@ -1349,13 +1349,13 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
        }
        person->listEMail = listEMail;
 
-       // Get groups where person's email is listed
+       /* Get groups where person's email is listed */
        listGroup = addrcache_get_group_for_person( book->addressCache, person );
        if( listGroup ) {
                GHashTable *hashEMail;
                GList *nodeGrp;
 
-               // Load hash table with new address entries
+               /* Load hash table with new address entries */
                hashEMail = g_hash_table_new( g_str_hash, g_str_equal );
                node = listEMail;
                while( node ) {
@@ -1368,7 +1368,7 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
                        node = g_list_next( node );
                }
 
-               // Re-parent new addresses to existing groups, where email address match.
+               /* Re-parent new addresses to existing groups, where email address match. */
                nodeGrp = listGroup;
                while( nodeGrp ) {
                        ItemGroup *group = ( ItemGroup * ) nodeGrp->data;
@@ -1376,31 +1376,31 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
                        GList *nodeGrpEM;
                        GList *listRemove = NULL;
 
-                       // Process each email item linked to group
+                       /* Process each email item linked to group */
                        nodeGrpEM = groupEMail;
                        while( nodeGrpEM ) {
                                ItemEMail *emailGrp = ( ItemEMail * ) nodeGrpEM->data;
                                if( ADDRITEM_PARENT(emailGrp) == ADDRITEM_OBJECT(person) ) {
-                                       // Found an email address for this person
+                                       /* Found an email address for this person */
                                        ItemEMail *emailNew = NULL;
                                        gchar *addr = g_strdup( emailGrp->address );
                                        g_strdown( addr );
                                        emailNew = ( ItemEMail * ) g_hash_table_lookup( hashEMail, addr );
                                        g_free( addr );
                                        if( emailNew ) {
-                                               // Point to this entry
+                                               /* Point to this entry */
                                                nodeGrpEM->data = emailNew;
                                        }
                                        else {
-                                               // Mark for removal
+                                               /* Mark for removal */
                                                listRemove = g_list_append( listRemove, emailGrp );
                                        }
                                }
-                               // Move on to next email link
+                               /* Move on to next email link */
                                nodeGrpEM = g_list_next( nodeGrpEM );
                        }
 
-                       // Process all removed links in current group
+                       /* Process all removed links in current group */
                        nodeGrpEM = listRemove;
                        while( nodeGrpEM ) {
                                ItemEMail *emailGrp = nodeGrpEM->data;
@@ -1408,12 +1408,12 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
                                nodeGrpEM = g_list_next( nodeGrpEM );
                        }
 
-                       // Move on to next group
+                       /* Move on to next group */
                        nodeGrp = g_list_next( nodeGrp );
 
                }
 
-               // Clear hash table
+               /* Clear hash table */
                g_hash_table_foreach_remove( hashEMail, ( GHRFunc ) addrbook_free_simple_hash_vis, NULL );
                g_hash_table_destroy( hashEMail );
                hashEMail = NULL;
@@ -1421,7 +1421,7 @@ void addrbook_update_address_list( AddressBookFile *book, ItemPerson *person, GL
                listGroup = NULL;
        }
 
-       // Free up old data
+       /* Free up old data */
        addritem_free_list_email( oldData );
        oldData = NULL;
        book->dirtyFlag = TRUE;
@@ -1499,7 +1499,7 @@ static void addrbook_build_avail_email_vis( gpointer key, gpointer value, gpoint
                GList *node = person->listEMail;
                while( node ) {
                        ItemEMail *email = node->data;
-                       //gchar *newKey = g_strdup( ADDRITEM_ID(email) );
+                       /* gchar *newKey = g_strdup( ADDRITEM_ID(email) ); */
 
                        if( ! g_hash_table_lookup( book->tempHash, ADDRITEM_ID(email) ) ) {
                                book->tempList = g_list_append( book->tempList, email );
@@ -1522,7 +1522,7 @@ GList *addrbook_get_available_email_list( AddressBookFile *book, ItemGroup *grou
 
        g_return_val_if_fail( book != NULL, NULL );
 
-       // Load hash table with group email entries
+       /* Load hash table with group email entries */
        table = g_hash_table_new( g_str_hash, g_str_equal );
        if( group ) {
                list = group->listEMail;
@@ -1533,7 +1533,7 @@ GList *addrbook_get_available_email_list( AddressBookFile *book, ItemGroup *grou
                }
        }
 
-       // Build list of available email addresses which exclude those already in groups
+       /* Build list of available email addresses which exclude those already in groups */
        book->tempList = NULL;
        book->tempHash = table;
        g_hash_table_foreach( book->addressCache->itemHash, addrbook_build_avail_email_vis, book );
@@ -1541,7 +1541,7 @@ GList *addrbook_get_available_email_list( AddressBookFile *book, ItemGroup *grou
        book->tempList = NULL;
        book->tempHash = NULL;
 
-       // Clear hash table
+       /* Clear hash table */
        g_hash_table_destroy( table );
        table = NULL;
 
@@ -1563,7 +1563,7 @@ void addrbook_update_group_list( AddressBookFile *book, ItemGroup *group, GList
        g_return_if_fail( book != NULL );
        g_return_if_fail( group != NULL );
 
-       // Remember old list
+       /* Remember old list */
        oldData = group->listEMail;
        group->listEMail = listEMail;
        mgu_clear_list( oldData );
@@ -1638,22 +1638,22 @@ void addrbook_update_attrib_list( AddressBookFile *book, ItemPerson *person, GLi
        g_return_if_fail( book != NULL );
        g_return_if_fail( person != NULL );
 
-       // Remember old list
+       /* Remember old list */
        oldData = person->listAttrib;
 
-       // Attach new address list to person.
+       /* Attach new address list to person. */
        node = listAttrib;
        while( node ) {
                UserAttribute *attrib = node->data;
                if( attrib->uid == NULL ) {
-                       // Allocate an ID
+                       /* Allocate an ID */
                        addrcache_id_attribute( book->addressCache, attrib );
                }
                node = g_list_next( node );
        }
        person->listAttrib = listAttrib;
 
-       // Free up old data
+       /* Free up old data */
        addritem_free_list_attribute( oldData );
        oldData = NULL;
        book->dirtyFlag = TRUE;
@@ -1814,7 +1814,7 @@ GList *addrbook_get_bookfile_list( AddressBookFile *book ) {
                                                }
                                        }
                                        if( flg ) {
-                                               // Get value
+                                               /* Get value */
                                                val = strtol( numbuf, &endptr, 10 );
                                                if( endptr  && val > -1 ) {
                                                        if( val > maxval ) maxval = val;
@@ -1881,7 +1881,7 @@ static void addrbook_chkparse_addr_list( AddressBookFile *book, XMLFile *file ){
                }
                if (file->level < prev_level) return;
                attr = xml_get_current_tag_attr(file);
-               // addrbook_show_attribs( attr );
+               /* addrbook_show_attribs( attr ); */
                if( xml_compare_tag( file, AB_ELTAG_ADDRESS ) ) {
                        addrbook_chkparse_addr_list( book, file );
                }
@@ -1896,9 +1896,9 @@ static void addrbook_chkparse_attribute( AddressBookFile *book, XMLFile *file )
        gchar *element;
 
        attr = xml_get_current_tag_attr(file);
-       // addrbook_show_attribs( attr );
+       /* addrbook_show_attribs( attr ); */
        element = xml_get_element( file );
-       // printf( "\t\tattrib value : %s\n", element );
+       /* printf( "\t\tattrib value : %s\n", element ); */
 }
 
 /*
@@ -1927,14 +1927,14 @@ static void addrbook_chkparse_person( AddressBookFile *book, XMLFile *file ) {
        GList *attr;
 
        attr = xml_get_current_tag_attr(file);
-       // addrbook_show_attribs( attr );
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       /* addrbook_show_attribs( attr ); */
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ADDRESS_LIST ) ) {
                addrbook_chkparse_addr_list( book, file );
        }
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ATTRIBUTE_LIST ) ) {
@@ -1957,12 +1957,12 @@ static void addrbook_chkparse_member_list( AddressBookFile *book, XMLFile *file
                if (file->level < prev_level) return;
                if( xml_compare_tag( file, AB_ELTAG_MEMBER ) ) {
                        attr = xml_get_current_tag_attr(file);
-                       // addrbook_show_attribs( attr );
+                       /* addrbook_show_attribs( attr ); */
                        addrbook_chkparse_member_list( book, file );
                }
                else {
                        attr = xml_get_current_tag_attr( file );
-                       // addrbook_show_attribs( attr );
+                       /* addrbook_show_attribs( attr ); */
                }
        }
 }
@@ -1974,8 +1974,8 @@ static void addrbook_chkparse_group( AddressBookFile *book, XMLFile *file ) {
        GList *attr;
 
        attr = xml_get_current_tag_attr(file);
-       // addrbook_show_attribs( attr );
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       /* addrbook_show_attribs( attr ); */
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_MEMBER_LIST ) ) {
@@ -1998,12 +1998,12 @@ static void addrbook_chkparse_folder_list( AddressBookFile *book, XMLFile *file
                if (file->level < prev_level) return;
                if( xml_compare_tag( file, AB_ELTAG_ITEM ) ) {
                        attr = xml_get_current_tag_attr(file);
-                       // addrbook_show_attribs( attr );
+                       /* addrbook_show_attribs( attr ); */
                        addrbook_chkparse_folder_list( book, file );
                }
                else {
                        attr = xml_get_current_tag_attr( file );
-                       // addrbook_show_attribs( attr );
+                       /* addrbook_show_attribs( attr ); */
                }
        }
 }
@@ -2015,8 +2015,8 @@ static void addrbook_chkparse_folder( AddressBookFile *book, XMLFile *file ) {
        GList *attr;
 
        attr = xml_get_current_tag_attr(file);
-       // addrbook_show_attribs( attr );
-       if( xml_parse_next_tag( file ) ) {      // Consume closing tag
+       /* addrbook_show_attribs( attr ); */
+       if( xml_parse_next_tag( file ) ) {      /* Consume closing tag */
                longjmp( book->jumper, 1 );
        }
        if( xml_compare_tag( file, AB_ELTAG_ITEM_LIST ) ) {
index de40b03ea8e6953ded56b6394df58307edf3de3b..7b47b3826f4244635993f66f542f24a6aea90ad7 100644 (file)
@@ -25,7 +25,7 @@
 #include <sys/stat.h>
 #include <glib.h>
 
-// #include "mgutils.h"
+/* #include "mgutils.h" */
 #include "addritem.h"
 #include "addrcache.h"
 
@@ -46,7 +46,7 @@ AddressCache *addrcache_create() {
        cache->modified = FALSE;
        cache->modifyTime = 0;
 
-       // Generate the next ID using system time
+       /* Generate the next ID using system time */
        cache->nextID = 1;
        t = time( NULL );
        if( t > 0 ) {
@@ -147,7 +147,7 @@ static void addrcache_free_all_folders( ItemFolder *parent ) {
 void addrcache_clear( AddressCache *cache ) {
        g_return_if_fail( cache != NULL );
 
-       // Free up folders and hash table
+       /* Free up folders and hash table */
        addrcache_free_all_folders( cache->rootFolder );
        addrcache_free_item_hash( cache->itemHash );
        cache->itemHash = NULL;
@@ -157,7 +157,7 @@ void addrcache_clear( AddressCache *cache ) {
        g_list_free( cache->tempList );
        cache->tempList = NULL;
 
-       // Reset to initial state
+       /* Reset to initial state */
        cache->itemHash = g_hash_table_new( g_str_hash, g_str_equal );
        cache->rootFolder = addritem_create_item_folder();
        cache->rootFolder->isRoot = TRUE;
@@ -514,7 +514,7 @@ AddrItemObject *addrcache_get_object( AddressCache *cache, const gchar *uid ) {
        if( uid == NULL || *uid == '\0' ) return NULL;
        obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
        if( obj ) {
-               // Check for matching UID
+               /* Check for matching UID */
                uidH = ADDRITEM_ID(obj);
                if( uidH ) {
                        if( strcmp( uidH, uid ) == 0 ) return obj;
@@ -571,7 +571,7 @@ ItemEMail *addrcache_get_email( AddressCache *cache, const gchar *uid, const gch
        objP = addrcache_get_object( cache, uid );
        if( objP ) {
                if( ADDRITEM_TYPE(objP) == ITEMTYPE_PERSON ) {
-                       // Sequential search through email addresses
+                       /* Sequential search through email addresses */
                        ItemPerson *person = ( ItemPerson * ) objP;
                        GList *nodeMail = person->listEMail;
                        while( nodeMail ) {
@@ -642,7 +642,7 @@ ItemGroup *addrcache_remove_group_id( AddressCache *cache, const gchar *uid ) {
                        ItemGroup *group = ( ItemGroup * ) obj;
                        ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(group);
                        if( ! parent ) parent = cache->rootFolder;
-                       // Remove group from parent's list and hash table
+                       /* Remove group from parent's list and hash table */
                        parent->listGroup = g_list_remove( parent->listGroup, group );
                        g_hash_table_remove( cache->itemHash, uid );
                        return ( ItemGroup * ) obj;
@@ -669,7 +669,7 @@ ItemGroup *addrcache_remove_group( AddressCache *cache, ItemGroup *group ) {
                        ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(group);
                        if( ! parent ) parent = cache->rootFolder;
 
-                       // Remove group from parent's list and hash table
+                       /* Remove group from parent's list and hash table */
                        parent->listGroup = g_list_remove( parent->listGroup, obj );
                        g_hash_table_remove( cache->itemHash, uid );
                        return group;
@@ -687,7 +687,7 @@ static void addrcache_foldergrp_rem_person( ItemFolder *folder, ItemPerson *pers
        while( nodeGrp ) {
                ItemGroup *group = nodeGrp->data;
                if( group ) {
-                       // Remove each email address that belongs to the person from the list
+                       /* Remove each email address that belongs to the person from the list */
                        GList *node = person->listEMail;
                        while( node ) {
                                group->listEMail = g_list_remove( group->listEMail, node->data );
@@ -714,13 +714,13 @@ ItemPerson *addrcache_remove_person_id( AddressCache *cache, const gchar *uid )
        obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
        if( obj ) {
                if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                       // Remove person's email addresses from all groups where
-                       // referenced and from hash table.
+                       /* Remove person's email addresses from all groups where
+                          referenced and from hash table. */
                        ItemPerson *person = ( ItemPerson * ) obj;
                        ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(person);
                        if( ! parent ) parent = cache->rootFolder;
-                       // Remove emails from groups, remove from parent's list
-                       // and hash table
+                       /* Remove emails from groups, remove from parent's list
+                          and hash table */
                        addrcache_foldergrp_rem_person( parent, person );
                        parent->listPerson = g_list_remove( parent->listPerson, person );
                        g_hash_table_remove( cache->itemHash, uid );
@@ -746,8 +746,8 @@ ItemPerson *addrcache_remove_person( AddressCache *cache, ItemPerson *person ) {
                obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
                if( obj ) {
                        if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
-                               // Remove person's email addresses from all groups where
-                               // referenced and from hash table.
+                               /* Remove person's email addresses from all groups where
+                                  referenced and from hash table. */
                                ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(person);
                                if( ! parent ) parent = cache->rootFolder;
                                addrcache_foldergrp_rem_person( parent, person );
@@ -771,7 +771,7 @@ static void addrcache_allgrp_rem_email_vis( gpointer key, gpointer value, gpoint
        if( ADDRITEM_TYPE(obj) == ITEMTYPE_GROUP ) {
                ItemGroup *group = ( ItemGroup * ) value;
                if( group ) {
-                       // Remove each email address that belongs to the person from the list
+                       /* Remove each email address that belongs to the person from the list */
                        group->listEMail = g_list_remove( group->listEMail, email );
                }
        }
@@ -793,14 +793,14 @@ ItemEMail *addrcache_person_remove_email_id( AddressCache *cache, const gchar *u
        if( person ) {
                email = addritem_person_remove_email_id( person, eid );
                if( email ) {
-                       // Remove email from all groups.
+                       /* Remove email from all groups. */
                        g_hash_table_foreach( cache->itemHash, addrcache_allgrp_rem_email_vis, email );
 
-                       // Remove email from person's address list
+                       /* Remove email from person's address list */
                        if( person->listEMail ) {
                                person->listEMail = g_list_remove( person->listEMail, email );
                        }
-                       // Unlink reference to person.
+                       /* Unlink reference to person. */
                        ADDRITEM_PARENT(email) = NULL;
                }
        }
@@ -821,14 +821,14 @@ ItemEMail *addrcache_person_remove_email( AddressCache *cache, ItemPerson *perso
        if( person && email ) {
                found = addritem_person_remove_email( person, email );
                if( found ) {
-                       // Remove email from all groups.
+                       /* Remove email from all groups. */
                        g_hash_table_foreach( cache->itemHash, addrcache_allgrp_rem_email_vis, email );
 
-                       // Remove email from person's address list
+                       /* Remove email from person's address list */
                        if( person->listEMail ) {
                                person->listEMail = g_list_remove( person->listEMail, email );
                        }
-                       // Unlink reference to person.
+                       /* Unlink reference to person. */
                        ADDRITEM_PARENT(email) = NULL;
                }
        }
@@ -1099,7 +1099,7 @@ ItemFolder *addrcache_remove_folder( AddressCache *cache, ItemFolder *folder ) {
                        AddrItemObject *aio;
                        if( ! parent ) parent = cache->rootFolder;
 
-                       // Re-parent children in folder
+                       /* Re-parent children in folder */
                        node = folder->listFolder;
                        while( node ) {
                                aio = ( AddrItemObject * ) node->data;
@@ -1122,7 +1122,7 @@ ItemFolder *addrcache_remove_folder( AddressCache *cache, ItemFolder *folder ) {
                                node = g_list_next( node );
                        }
 
-                       // Remove folder from parent's list and hash table
+                       /* Remove folder from parent's list and hash table */
                        parent->listFolder = g_list_remove( parent->listFolder, folder );
                        ADDRITEM_PARENT(folder) = NULL;
                        g_hash_table_remove( cache->itemHash, uid );
@@ -1150,7 +1150,7 @@ ItemFolder *addrcache_remove_folder_delete( AddressCache *cache, ItemFolder *fol
                        ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(folder);
                        if( ! parent ) parent = cache->rootFolder;
 
-                       // Remove groups
+                       /* Remove groups */
                        while( folder->listGroup ) {
                                ItemGroup *item = ( ItemGroup * ) folder->listGroup->data;
                                item = addrcache_remove_group( cache, item );
@@ -1169,7 +1169,7 @@ ItemFolder *addrcache_remove_folder_delete( AddressCache *cache, ItemFolder *fol
                                }
                        }
 
-                       // Recursive deletion of folder
+                       /* Recursive deletion of folder */
                        while( folder->listFolder ) {
                                ItemFolder *item = ( ItemFolder * ) folder->listFolder->data;
                                item = addrcache_remove_folder_delete( cache, item );
@@ -1179,7 +1179,7 @@ ItemFolder *addrcache_remove_folder_delete( AddressCache *cache, ItemFolder *fol
                                }
                        }
 
-                       // Remove folder from parent's list and hash table
+                       /* Remove folder from parent's list and hash table */
                        parent->listFolder = g_list_remove( parent->listFolder, folder );
                        ADDRITEM_PARENT(folder) = NULL;
                        g_hash_table_remove( cache->itemHash, uid );
@@ -1210,13 +1210,13 @@ ItemPerson *addrcache_add_contact( AddressCache *cache, ItemFolder *folder, cons
 
        if( ! f ) f = cache->rootFolder;
 
-       // Create person object
+       /* Create person object */
        person = addritem_create_item_person();
        addritem_person_set_common_name( person, name );
        addrcache_id_person( cache, person );
        addrcache_folder_add_person( cache, f, person );
 
-       // Create email object
+       /* Create email object */
        email = addritem_create_item_email();
        addritem_email_set_address( email, address );
        addritem_email_set_remarks( email, remarks );
index f078afa3be7abc242970507ac23f4b2caa5e699d..70127ad4d1aa7eb5784fc87b243d33df1bb58ed8 100644 (file)
@@ -336,7 +336,7 @@ ItemEMail *addritem_person_get_email( ItemPerson *person, const gchar *eid ) {
        g_return_val_if_fail( person != NULL, NULL );
        if( eid == NULL || *eid == '\0' ) return NULL;
 
-       // Look for email
+       /* Look for email */
        node = person->listEMail;
        while( node ) {
                AddrItemObject *objE = node->data;
@@ -364,7 +364,7 @@ ItemEMail *addritem_person_remove_email_id( ItemPerson *person, const gchar *eid
        g_return_val_if_fail( person != NULL, NULL );
        if( eid == NULL || *eid == '\0' ) return NULL;
 
-       // Look for email
+       /* Look for email */
        node = person->listEMail;
        while( node ) {
                AddrItemObject *objE = node->data;
@@ -378,11 +378,11 @@ ItemEMail *addritem_person_remove_email_id( ItemPerson *person, const gchar *eid
        }
 
        if( email ) {
-               // Remove email from person's address list
+               /* Remove email from person's address list */
                if( person->listEMail ) {
                        person->listEMail = g_list_remove( person->listEMail, email );
                }
-               // Unlink reference to person.
+               /* Unlink reference to person. */
                ADDRITEM_PARENT(email) = NULL;
        }
        return email;
@@ -401,7 +401,7 @@ ItemEMail *addritem_person_remove_email( ItemPerson *person, ItemEMail *email )
        g_return_val_if_fail( person != NULL, NULL );
        if( email == NULL ) return NULL;
 
-       // Look for email
+       /* Look for email */
        node = person->listEMail;
        while( node ) {
                if( node-> data == email ) {
@@ -412,11 +412,11 @@ ItemEMail *addritem_person_remove_email( ItemPerson *person, ItemEMail *email )
        }
 
        if( found ) {
-               // Remove email from person's address list
+               /* Remove email from person's address list */
                if( person->listEMail ) {
                        person->listEMail = g_list_remove( person->listEMail, email );
                }
-               // Unlink reference to person.
+               /* Unlink reference to person. */
                ADDRITEM_PARENT(email) = NULL;
                return email;
        }
@@ -445,7 +445,7 @@ UserAttribute *addritem_person_get_attribute( ItemPerson *person, const gchar *a
        g_return_val_if_fail( person != NULL, NULL );
        if( aid == NULL || *aid == '\0' ) return NULL;
 
-       // Look for attribute
+       /* Look for attribute */
        node = person->listAttrib;
        while( node ) {
                UserAttribute *attr = node->data;
@@ -473,7 +473,7 @@ UserAttribute *addritem_person_remove_attrib_id( ItemPerson *person, const gchar
        g_return_val_if_fail( person != NULL, NULL );
        if( aid == NULL || *aid == '\0' ) return NULL;
 
-       // Look for attribute
+       /* Look for attribute */
        node = person->listAttrib;
        while( node ) {
                UserAttribute *attr = node->data;
@@ -486,7 +486,7 @@ UserAttribute *addritem_person_remove_attrib_id( ItemPerson *person, const gchar
                node = g_list_next( node );
        }
 
-       // Remove email from person's address list
+       /* Remove email from person's address list */
        if( person->listAttrib ) {
                person->listAttrib = g_list_remove( person->listAttrib, attrib );
        }
@@ -506,7 +506,7 @@ UserAttribute *addritem_person_remove_attribute( ItemPerson *person, UserAttribu
        g_return_val_if_fail( person != NULL, NULL );
        if( attrib == NULL ) return NULL;
 
-       // Look for attribute
+       /* Look for attribute */
        node = person->listAttrib;
        while( node ) {
                if( node-> data == attrib ) {
@@ -517,7 +517,7 @@ UserAttribute *addritem_person_remove_attribute( ItemPerson *person, UserAttribu
        }
 
        if( found ) {
-               // Remove attribute
+               /* Remove attribute */
                if( person->listAttrib ) {
                        person->listAttrib = g_list_remove( person->listAttrib, attrib );
                }
@@ -717,7 +717,7 @@ void addritem_folder_set_remarks( ItemFolder *folder, const gchar *value ) {
 void addritem_free_item_folder( ItemFolder *folder ) {
        g_return_if_fail( folder != NULL );
 
-       // Free internal stuff
+       /* Free internal stuff */
        g_free( ADDRITEM_ID(folder) );
        g_free( ADDRITEM_NAME(folder) );
        g_free( folder->remarks );
@@ -771,7 +771,7 @@ void addritem_folder_free_person( ItemFolder *folder ) {
 
        g_return_if_fail( folder != NULL );
        
-       // Free up folder of persons.
+       /* Free up folder of persons. */
        node = folder->listPerson;
        while( node ) {
                ItemPerson *person = node->data;
@@ -825,7 +825,7 @@ gboolean addritem_folder_add_group( ItemFolder *folder, ItemGroup *item ) {
 */
 void addritem_print_item_folder( ItemFolder *folder, FILE *stream ) {
        GList *node;
-       //ItemPerson *person;
+       /* ItemPerson *person; */
        ItemFolder *parent;
 
        g_return_if_fail( folder != NULL );
index 3b71d06fb774dd98f7bd341ab3939f935340f7ae..fe8c45e033c301c512f2f0739a20825d4483d213 100644 (file)
 #define JPILOT_DBHOME_FILE  "AddressDB.pdb"
 #define PILOT_LINK_LIB_NAME "libpisock.so"
 
-#define IND_LABEL_LASTNAME  0  // Index of last name in address data
-#define IND_LABEL_FIRSTNAME 1  // Index of first name in address data
-#define IND_PHONE_EMAIL     4  // Index of E-Mail address in phone labels
-#define OFFSET_PHONE_LABEL  3  // Offset to phone data in address data
-#define IND_CUSTOM_LABEL    14 // Offset to custom label names
-#define NUM_CUSTOM_LABEL    4  // Number of custom labels
-
-// Shamelessly copied from JPilot (libplugin.h)
+#define IND_LABEL_LASTNAME  0  /* Index of last name in address data */
+#define IND_LABEL_FIRSTNAME 1  /* Index of first name in address data */
+#define IND_PHONE_EMAIL     4  /* Index of E-Mail address in phone labels */
+#define OFFSET_PHONE_LABEL  3  /* Offset to phone data in address data */
+#define IND_CUSTOM_LABEL    14 /* Offset to custom label names */
+#define NUM_CUSTOM_LABEL    4  /* Number of custom labels */
+
+/* Shamelessly copied from JPilot (libplugin.h) */
 typedef struct {
        unsigned char db_name[32];
        unsigned char flags[2];
@@ -81,7 +81,7 @@ typedef struct {
        unsigned char number_of_records[2];
 } RawDBHeader;
 
-// Shamelessly copied from JPilot (libplugin.h)
+/* Shamelessly copied from JPilot (libplugin.h) */
 typedef struct {
        char db_name[32];
        unsigned int flags;
@@ -99,14 +99,14 @@ typedef struct {
        unsigned int number_of_records;
 } DBHeader;
 
-// Shamelessly copied from JPilot (libplugin.h)
+/* Shamelessly copied from JPilot (libplugin.h) */
 typedef struct {
        unsigned char Offset[4];  /*4 bytes offset from BOF to record */
        unsigned char attrib;
        unsigned char unique_ID[3];
 } record_header;
 
-// Shamelessly copied from JPilot (libplugin.h)
+/* Shamelessly copied from JPilot (libplugin.h) */
 typedef struct mem_rec_header_s {
        unsigned int rec_num;
        unsigned int offset;
@@ -115,7 +115,7 @@ typedef struct mem_rec_header_s {
        struct mem_rec_header_s *next;
 } mem_rec_header;
 
-// Shamelessly copied from JPilot (libplugin.h)
+/* Shamelessly copied from JPilot (libplugin.h) */
 #define SPENT_PC_RECORD_BIT    256
 
 typedef enum {
@@ -127,7 +127,7 @@ typedef enum {
        DELETED_DELETED_PALM_REC = SPENT_PC_RECORD_BIT + 105L
 } PCRecType;
 
-// Shamelessly copied from JPilot (libplugin.h)
+/* Shamelessly copied from JPilot (libplugin.h) */
 typedef struct {
        PCRecType rt;
        unsigned int unique_id;
@@ -225,11 +225,11 @@ void jpilot_clear_custom_labels( JPilotFile *pilotFile ) {
 
        g_return_if_fail( pilotFile != NULL );
 
-       // Release custom labels
+       /* Release custom labels */
        mgu_free_dlist( pilotFile->customLabels );
        pilotFile->customLabels = NULL;
 
-       // Release indexes
+       /* Release indexes */
        node = pilotFile->labelInd;
        while( node ) {
                node->data = NULL;
@@ -238,7 +238,7 @@ void jpilot_clear_custom_labels( JPilotFile *pilotFile ) {
        g_list_free( pilotFile->labelInd );
        pilotFile->labelInd = NULL;
 
-       // Force a fresh read
+       /* Force a fresh read */
        addrcache_refresh( pilotFile->addressCache );
 }
 
@@ -257,7 +257,7 @@ void jpilot_add_custom_label( JPilotFile *pilotFile, const gchar *labelName ) {
                }
                else {
                        pilotFile->customLabels = g_list_append( pilotFile->customLabels, labelCopy );
-                       // Force a fresh read
+                       /* Force a fresh read */
                        addrcache_refresh( pilotFile->addressCache );
                }
        }
@@ -290,7 +290,7 @@ void jpilot_free( JPilotFile *pilotFile ) {
        /* Free internal stuff */
        g_free( pilotFile->path );
 
-       // Release custom labels
+       /* Release custom labels */
        jpilot_clear_custom_labels( pilotFile );
 
        /* Clear cache */
@@ -365,7 +365,7 @@ void jpilot_print_short( JPilotFile *pilotFile, FILE *stream ) {
        addrcache_print( pilotFile->addressCache, stream );
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
+/* Shamelessly copied from JPilot (libplugin.c) */
 static unsigned int bytes_to_bin(unsigned char *bytes, unsigned int num_bytes) {
 unsigned int i, n;
        n=0;
@@ -375,16 +375,16 @@ unsigned int i, n;
        return n;
 }
 
-// Shamelessly copied from JPilot (utils.c)
-/*These next 2 functions were copied from pi-file.c in the pilot-link app */
-/* Exact value of "Jan 1, 1970 0:00:00 GMT" - "Jan 1, 1904 0:00:00 GMT" */
+/* Shamelessly copied from JPilot (utils.c)
+   These next 2 functions were copied from pi-file.c in the pilot-link app
+   Exact value of "Jan 1, 1970 0:00:00 GMT" - "Jan 1, 1904 0:00:00 GMT" */
 #define PILOT_TIME_DELTA (unsigned)(2082844800)
 
 time_t pilot_time_to_unix_time ( unsigned long raw_time ) {
    return (time_t)(raw_time - PILOT_TIME_DELTA);
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
+/* Shamelessly copied from JPilot (libplugin.c) */
 static int raw_header_to_header(RawDBHeader *rdbh, DBHeader *dbh) {
        unsigned long temp;
 
@@ -412,7 +412,7 @@ static int raw_header_to_header(RawDBHeader *rdbh, DBHeader *dbh) {
        return 0;
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
+/* Shamelessly copied from JPilot (libplugin.c) */
 /*returns 1 if found */
 /*        0 if eof */
 static int find_next_offset( mem_rec_header *mem_rh, long fpos,
@@ -439,7 +439,7 @@ static int find_next_offset( mem_rec_header *mem_rh, long fpos,
        return found;
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
+/* Shamelessly copied from JPilot (libplugin.c) */
 static void free_mem_rec_header(mem_rec_header **mem_rh) {
        mem_rec_header *h, *next_h;
        for (h=*mem_rh; h; h=next_h) {
@@ -449,7 +449,7 @@ static void free_mem_rec_header(mem_rec_header **mem_rh) {
        *mem_rh = NULL;
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
+/* Shamelessly copied from JPilot (libplugin.c) */
 static int jpilot_free_db_list( GList **br_list ) {
        GList *temp_list, *first;
        buf_rec *br;
@@ -474,8 +474,8 @@ static int jpilot_free_db_list( GList **br_list ) {
        return 0;
 }
 
-// Shamelessly copied from JPilot (libplugin.c)
-// Read file size.
+/* Shamelessly copied from JPilot (libplugin.c)
+   Read file size. */
 static int jpilot_get_info_size( FILE *in, int *size ) {
        RawDBHeader rdbh;
        DBHeader dbh;
@@ -485,7 +485,7 @@ static int jpilot_get_info_size( FILE *in, int *size ) {
        fseek(in, 0, SEEK_SET);
        fread(&rdbh, sizeof(RawDBHeader), 1, in);
        if (feof(in)) {
-               // fprintf( stderr, "error reading file in 'jpilot_get_info_size'\n" );
+               /* fprintf( stderr, "error reading file in 'jpilot_get_info_size'\n" ); */
                return MGU_EOF;
        }
 
@@ -511,8 +511,8 @@ static int jpilot_get_info_size( FILE *in, int *size ) {
        return MGU_SUCCESS;
 }
 
-// Read address file into address list. Based on JPilot's
-// libplugin.c (jp_get_app_info)
+/* Read address file into address list. Based on JPilot's
+   libplugin.c (jp_get_app_info) */
 static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, int *buf_size ) {
        FILE *in;
        int num;
@@ -530,19 +530,19 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
        if( pilotFile->path ) {
                in = fopen( pilotFile->path, "r" );
                if( !in ) {
-                       // fprintf( stderr, "can't open %s\n", pilotFile->path );
+                       /* fprintf( stderr, "can't open %s\n", pilotFile->path ); */
                        return MGU_OPEN_FILE;
                }
        }
        else {
-               // fprintf( stderr, "file not specified\n" );
+               /* fprintf( stderr, "file not specified\n" ); */
                return MGU_NO_FILE;
        }
 
        num = fread( &rdbh, sizeof( RawDBHeader ), 1, in );
        if( num != 1 ) {
                if( ferror(in) ) {
-                       // fprintf( stderr, "error reading %s\n", pilotFile->path );
+                       /* fprintf( stderr, "error reading %s\n", pilotFile->path ); */
                        fclose(in);
                        return MGU_ERROR_READ;
                }
@@ -552,7 +552,7 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
                return MGU_EOF;
        }
 
-       // Convert header into something recognizable
+       /* Convert header into something recognizable */
        raw_header_to_header(&rdbh, &dbh);
 
        num = jpilot_get_info_size(in, &rec_size);
@@ -564,7 +564,7 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
        fseek(in, dbh.app_info_offset, SEEK_SET);
        *buf = ( char * ) malloc(rec_size);
        if (!(*buf)) {
-               // fprintf( stderr, "jpilot_get_file_info(): Out of memory\n" );
+               /* fprintf( stderr, "jpilot_get_file_info(): Out of memory\n" ); */
                fclose(in);
                return MGU_OO_MEMORY;
        }
@@ -573,7 +573,7 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
                if (ferror(in)) {
                        fclose(in);
                        free(*buf);
-                       // fprintf( stderr, "Error reading %s\n", pilotFile->path );
+                       /* fprintf( stderr, "Error reading %s\n", pilotFile->path ); */
                        return MGU_ERROR_READ;
                }
        }
@@ -586,8 +586,8 @@ static gint jpilot_get_file_info( JPilotFile *pilotFile, unsigned char **buf, in
 
 #define        FULLNAME_BUFSIZE   256
 #define        EMAIL_BUFSIZE      256
-// Read address file into address cache. Based on JPilot's
-// jp_read_DB_files (from libplugin.c)
+/* Read address file into address cache. Based on JPilot's
+   jp_read_DB_files (from libplugin.c) */
 static gint jpilot_read_file( JPilotFile *pilotFile ) {
        FILE *in;
        gchar *buf;
@@ -621,19 +621,19 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
        mem_rh = last_mem_rh = NULL;
        recs_returned = 0;
 
-       // Pointer to address metadata.
+       /* Pointer to address metadata. */
        ai = & pilotFile->addrInfo;
 
-       // Open file for read
+       /* Open file for read */
        if( pilotFile->path ) {
                in = fopen( pilotFile->path, "r" );
                if( !in ) {
-                       // fprintf( stderr, "can't open %s\n", pilotFile->path );
+                       /* fprintf( stderr, "can't open %s\n", pilotFile->path ); */
                        return MGU_OPEN_FILE;
                }
        }
        else {
-               // fprintf( stderr, "file not specified\n" );
+               /* fprintf( stderr, "file not specified\n" ); */
                return MGU_NO_FILE;
        }
 
@@ -641,7 +641,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
        num = fread(&rdbh, sizeof(RawDBHeader), 1, in);
        if (num != 1) {
                if (ferror(in)) {
-                       // fprintf( stderr, "error reading '%s'\n", pilotFile->path );
+                       /* fprintf( stderr, "error reading '%s'\n", pilotFile->path ); */
                        fclose(in);
                        return MGU_ERROR_READ;
                }
@@ -661,7 +661,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                num = fread( &rh, sizeof( record_header ), 1, in );
                if (num != 1) {
                        if (ferror(in)) {
-                               // fprintf( stderr, "error reading '%s'\n", pilotFile->path );
+                               /* fprintf( stderr, "error reading '%s'\n", pilotFile->path ); */
                                retVal = MGU_ERROR_READ;
                                break;
                        }
@@ -678,7 +678,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
 
                temp_mem_rh = (mem_rec_header *)malloc(sizeof(mem_rec_header));
                if (!temp_mem_rh) {
-                       // fprintf( stderr, "jpilot_read_db_file(): Out of memory 1\n" );
+                       /* fprintf( stderr, "jpilot_read_db_file(): Out of memory 1\n" ); */
                        retVal = MGU_OO_MEMORY;
                        break;
                }
@@ -698,7 +698,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                        last_mem_rh = temp_mem_rh;
                }
 
-       }       // for( ;; )
+       }       /* for( ;; ) */
 
        temp_mem_rh = mem_rh;
 
@@ -715,7 +715,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                }
                fseek(in, next_offset, SEEK_SET);
 
-               // Build array of pointers to categories;
+               /* Build array of pointers to categories; */
                i = 0;
                node = addrcache_get_list_folder( pilotFile->addressCache );
                while( node ) {
@@ -726,9 +726,9 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                        i++;
                }
 
-               // Now go load all records              
+               /* Now go load all records */           
                while(!feof(in)) {
-                       //struct CategoryAppInfo *cat = &ai->category;
+                       /* struct CategoryAppInfo *cat = &ai->category; */
 
                        fpos = ftell(in);
                        if (out_of_order) {
@@ -753,14 +753,14 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                        num = fread(buf, rec_size, 1, in);
                        if ((num != 1)) {
                                if (ferror(in)) {
-                                       // fprintf( stderr, "Error reading %s 5\n", pilotFile );
+                                       /* fprintf( stderr, "Error reading %s 5\n", pilotFile ); */
                                        free(buf);
                                        retVal = MGU_ERROR_READ;
                                        break;
                                }
                        }
 
-                       // Retrieve address
+                       /* Retrieve address */
                        inum = unpack_Address( & addr, buf, rec_size );
                        if( inum > 0 ) {
                                addrEnt = addr.entry;
@@ -788,7 +788,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                                g_free( extID );
                                extID = NULL;
 
-                               // Add entry for each email address listed under phone labels.
+                               /* Add entry for each email address listed under phone labels. */
                                indPhoneLbl = addr.phoneLabel;
                                for( k = 0; k < JPILOT_NUM_ADDR_PHONE; k++ ) {
                                        gint ind;
@@ -813,7 +813,7 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
                                        }
                                }
 
-                               // Add entry for each custom label
+                               /* Add entry for each custom label */
                                node = pilotFile->labelInd;
                                while( node ) {
                                        gint ind;
@@ -844,12 +844,12 @@ static gint jpilot_read_file( JPilotFile *pilotFile ) {
 
                                if( person->listEMail ) {
                                        if( cat_id > -1 && cat_id < JPILOT_NUM_CATEG ) {
-                                               // Add to specified category
+                                               /* Add to specified category */
                                                addrcache_folder_add_person(
                                                        pilotFile->addressCache, folderInd[cat_id], person );
                                        }
                                        else {
-                                               // Add to root folder
+                                               /* Add to root folder */
                                                addrcache_add_person( pilotFile->addressCache, person );
                                        }
                                }
@@ -881,7 +881,7 @@ static gint jpilot_read_metadata( JPilotFile *pilotFile ) {
        pilotFile->readMetadata = FALSE;
        addrcache_clear( pilotFile->addressCache );
 
-       // Read file info
+       /* Read file info */
        retVal = jpilot_get_file_info( pilotFile, &buf, &rec_size);
        if( retVal != MGU_SUCCESS ) {
                pilotFile->retVal = retVal;
@@ -893,7 +893,7 @@ static gint jpilot_read_metadata( JPilotFile *pilotFile ) {
                free(buf);
        }
        if( num <= 0 ) {
-               // fprintf( stderr, "error reading '%s'\n", pilotFile->path );
+               /* fprintf( stderr, "error reading '%s'\n", pilotFile->path ); */
                pilotFile->retVal = MGU_ERROR_READ;
                return pilotFile->retVal;
        }
@@ -914,7 +914,7 @@ static gboolean jpilot_setup_labels( JPilotFile *pilotFile ) {
 
        g_return_val_if_fail( pilotFile != NULL, -1 );
 
-       // Release indexes
+       /* Release indexes */
        node = pilotFile->labelInd;
        while( node ) {
                node->data = NULL;
@@ -1095,13 +1095,13 @@ static void jpilot_remove_empty( JPilotFile *pilotFile ) {
                ItemFolder *folder = node->data;
                if( ADDRITEM_NAME(folder) == NULL || *ADDRITEM_NAME(folder) == '\0' ) {
                        if( folder->listPerson ) {
-                               // Give name to folder
+                               /* Give name to folder */
                                gchar name[20];
                                sprintf( name, "? %d", i );
                                addritem_folder_set_name( folder, name );
                        }
                        else {
-                               // Mark for removal
+                               /* Mark for removal */
                                remList = g_list_append( remList, folder );
                        }
                }
@@ -1117,12 +1117,12 @@ static void jpilot_remove_empty( JPilotFile *pilotFile ) {
        g_list_free( remList );
 }
 
-// ============================================================================================
-/*
+/* ============================================================================================
+
 * Read file into list. Main entry point
 * Return: TRUE if file read successfully.
-*/
-// ============================================================================================
+
+  ============================================================================================ */
 gint jpilot_read_data( JPilotFile *pilotFile ) {
        g_return_val_if_fail( pilotFile != NULL, -1 );
 
@@ -1248,12 +1248,12 @@ gchar *jpilot_find_pilotdb( void ) {
        strcat( str, G_DIR_SEPARATOR_S );
        strcat( str, JPILOT_DBHOME_FILE );
 
-       // Attempt to open
+       /* Attempt to open */
        if( ( fp = fopen( str, "r" ) ) != NULL ) {
                fclose( fp );
        }
        else {
-               // Truncate filename
+               /* Truncate filename */
                str[ len ] = '\0';
        }
        return g_strdup( str );
@@ -1315,7 +1315,7 @@ gboolean jpilot_test_pilot_lib( void ) {
                return FALSE;
        }
 
-       // Test for symbols we need
+       /* Test for symbols we need */
        fun = dlsym( handle, "unpack_Address" );
        if( ! fun ) {
                dlclose( handle );