, 1 min read

Possible Enhancements to J-Pilot

Here are some thoughts about possible enhancements for J-Pilot.

  1. Convert pdb's and pc3's to SQLite. This makes it easier to analyze data according some criteria, e.g., find how many addresses have the same telephone numbers, how many entries in datebook contain the same substring, etc.
  2. Convert and transform pdb's and pc3's to Google GData (shut down or deprecated). The Google id, which is returned after transmitting data, is then possibly stored in pdb/pc3.
  3. Use mmap() instead of all its fread() and malloc()'s inside pilot-link and J-Pilot.
  4. When J-Pilot searches for strings in the case-insensitive case, then it copies all elements and uses malloc() for each element, see routine jp_strstr(). Instead, just use either strcasestr() or a home-brewed strstr() which takes care of case. New jp_strstr() is thus:
const char *jp_strstr(const char *haystack, const char *needle, int case_sense) {
    if (haystack == NULL) return NULL;
    if (needle == NULL) return haystack;
    return case_sense ? strstr(haystack, needle) : strcasestr(haystack, needle);
}
  1. Provide ncurses interfaces instead of Gtk. See for example calcurse.
  2. When searching for strings and then jumping to the result, it just shows the record, but it does not directly position the cursor to the string where it was found. In particular for memos this is a small nuisance.