"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "utils.h" between
jpilot-1.8.2.tar.gz and jpilot-2_0_1.tar.gz

About: J-Pilot is a desktop organizer application for Palm Pilot (PalmOS) devices. Ported to GTK3.

utils.h  (jpilot-1.8.2):utils.h  (jpilot-2_0_1)
skipping to change at line 59 skipping to change at line 59
# define PN "J-Pilot" # define PN "J-Pilot"
# define EPN "jpilot" # define EPN "jpilot"
#endif #endif
/* PRODID string for ical export */ /* PRODID string for ical export */
#define FPI_STRING "-//Judd Montgomery//NONSGML "PN" "VERSION"//EN" #define FPI_STRING "-//Judd Montgomery//NONSGML "PN" "VERSION"//EN"
/* This is how often the clock updates in milliseconds */ /* This is how often the clock updates in milliseconds */
#define CLOCK_TICK 1000 #define CLOCK_TICK 1000
/* How clist widget should appear for main apps */ /* How treeView widget should appear for main apps */
#define SHADOW GTK_SHADOW_ETCHED_OUT #define SHADOW GTK_SHADOW_ETCHED_OUT
/* Define the maximum length of a category name /* Define the maximum length of a category name
* when expressed in Pilot character set (assuming 15 * when expressed in Pilot character set (assuming 15
* character plus a delimiter) or in host character * character plus a delimiter) or in host character
* set (might be 50 or more if UTF-8). * set (might be 50 or more if UTF-8).
* Note : host length is temporarily kept as 16 until all * Note : host length is temporarily kept as 16 until all
* consequences are identified. In the meantime category * consequences are identified. In the meantime category
* names may be (hopefully safely) truncated. */ * names may be (hopefully safely) truncated. */
#define NUM_CATEGORIES 16 #define NUM_CATEGORIES 16
#define HOSTCAT_NAME_SZ 16 #define HOSTCAT_NAME_SZ 16
#define PILOTCAT_NAME_SZ 16 #define PILOTCAT_NAME_SZ 16
/* Constant used by J-Pilot to indicate "All" category */ /* Constant used by J-Pilot to indicate "All" category */
#define CATEGORY_ALL 300 #define CATEGORY_ALL 300
#define CATEGORY_EDIT 301
/* Used to mark the entry in the clist to add a record */ /* Used to mark the entry in the treeView to add a record */
#define CLIST_NEW_ENTRY_DATA 100 #define LIST_NEW_ENTRY_DATA 100
#define CLIST_ADDING_ENTRY_DATA 101 #define LIST_ADDING_ENTRY_DATA 101
#define CLIST_MIN_DATA 199 #define LIST_MIN_DATA 199
#define DIALOG_SAID_1 454 #define DIALOG_SAID_1 454
#define DIALOG_SAID_PRINT 454 #define DIALOG_SAID_PRINT 454
#define DIALOG_SAID_FOURTH 454 #define DIALOG_SAID_FOURTH 454
#define DIALOG_SAID_2 455 #define DIALOG_SAID_2 455
#define DIALOG_SAID_LAST 455 #define DIALOG_SAID_LAST 455
#define DIALOG_SAID_3 456 #define DIALOG_SAID_3 456
#define DIALOG_SAID_CANCEL 456 #define DIALOG_SAID_CANCEL 456
#define DIALOG_SAID_4 457 #define DIALOG_SAID_4 457
skipping to change at line 262 skipping to change at line 263
int plugin_flag; int plugin_flag;
unsigned int unique_id; unsigned int unique_id;
struct search_record *next; struct search_record *next;
}; };
struct sorted_cats struct sorted_cats
{ {
char Pcat[32]; char Pcat[32];
int cat_num; int cat_num;
}; };
typedef struct {
int found;
char* textToSearch;
} RestoreDataSearchElement;
struct name_list {
char *name;
struct name_list *next;
};
/* utils.c: The subroutines below are all from utils.c */ /* utils.c: The subroutines below are all from utils.c */
/* Takes an array of database names and changes the names /* Takes an array of database names and changes the names
* to the new PIM names */ * to the new PIM names */
void rename_dbnames(char dbname[][32]); void rename_dbnames(char dbname[][32]);
/* Return usage string that must be freed by the caller */ /* Return usage string that must be freed by the caller */
void fprint_usage_string(FILE *out); void fprint_usage_string(FILE *out);
int cat_compare(const void *v1, const void *v2); int cat_compare(const void *v1, const void *v2);
int get_timeout_interval(void); int get_timeout_interval(void);
gint timeout_sync_up(gpointer data); gint timeout_sync_up(gpointer data);
gint timeout_date(gpointer data); gint timeout_date(gpointer data);
int get_pixmaps(GtkWidget *widget, int get_pixbufs(int which_one,
int which_one, GdkPixbuf **out_pixbuf);
GdkPixmap **out_pixmap, int get_rcfile_name(int n, char *rc_copy);
GdkBitmap **out_mask);
int check_hidden_dir(void); int check_hidden_dir(void);
int read_gtkrc_file(void); int read_gtkrc_file(void);
int get_home_file_name(const char *file, char *full_name, int max_size); int get_home_file_name(const char *file, char *full_name, int max_size);
int unpack_db_header(DBHeader *dbh, unsigned char *buffer); int unpack_db_header(DBHeader *dbh, unsigned char *buffer);
int find_next_offset(mem_rec_header *mem_rh, long fpos, int find_next_offset(mem_rec_header *mem_rh, long fpos,
unsigned int *next_offset, unsigned int *next_offset,
unsigned char *attrib, unsigned int *unique_id); unsigned char *attrib, unsigned int *unique_id);
/*The VP is a pointer to MyAddress, MyAppointment, etc. */ /*The VP is a pointer to MyAddress, MyAppointment, etc. */
int delete_pc_record(AppType app_type, void *VP, int flag); int delete_pc_record(AppType app_type, void *VP, int flag);
int undelete_pc_record(AppType app_type, void *VP, int flag); int undelete_pc_record(AppType app_type, void *VP, int flag);
gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event);
gboolean button_pressed_for_motion (GtkWidget *widget, GdkEvent *event, gpointe
r user_data);
gboolean button_released_for_motion (GtkWidget *widget, GdkEvent *event, gpoint
er user_data);
void button_set_for_motion(int x);
void get_month_info(int month, int day, int year, int *dow, int *ndim); void get_month_info(int month, int day, int year, int *dow, int *ndim);
void free_mem_rec_header(mem_rec_header **mem_rh); void free_mem_rec_header(mem_rec_header **mem_rh);
void print_string(char *str, int len); void print_string(char *str, int len);
int get_app_info(char *DB_name, unsigned char **buf, int *buf_size); int get_app_info(char *DB_name, unsigned char **buf, int *buf_size);
int cleanup_pc_files(void); int cleanup_pc_files(void);
skipping to change at line 343 skipping to change at line 354
/* mon 0-11 /* mon 0-11
* day 1-31 * day 1-31
* year (year - 1900) * year (year - 1900)
* This function will bring up the cal at mon, day, year * This function will bring up the cal at mon, day, year
* After a new date is selected it will return mon, day, year * After a new date is selected it will return mon, day, year
*/ */
int cal_dialog(GtkWindow *main_window, int cal_dialog(GtkWindow *main_window,
const char *title, int monday_is_fdow, const char *title, int monday_is_fdow,
int *mon, int *day, int *year); int *mon, int *day, int *year);
void set_bg_rgb_clist_row(GtkWidget *clist, int row, int r, int g, int b); GdkRGBA get_color(int r, int g, int b);
void set_fg_rgb_clist_cell(GtkWidget *clist, int row, int col, int r, int g, int
b);
void entry_set_multiline_truncate(GtkEntry *entry, gboolean value); void entry_set_multiline_truncate(GtkEntry *entry, gboolean value);
void clist_clear(GtkCList *clist);
void set_tooltip(int show_tooltip, void set_tooltip(int show_tooltip,
GtkTooltips *tooltips,
GtkWidget *widget, GtkWidget *widget,
const gchar *tip_text, const gchar *tip_text);
const gchar *tip_private);
void clist_select_row(GtkCList *clist,
int row,
int column);
int clist_find_id(GtkWidget *clist,
unsigned int unique_id,
int *found_at);
int check_copy_DBs_to_home(void); int check_copy_DBs_to_home(void);
int verify_csv_header(const char *header, int num_fields, const char *file_name) ; int verify_csv_header(const char *header, int num_fields, const char *file_name) ;
void free_search_record_list(struct search_record **sr); void free_search_record_list(struct search_record **sr);
/* Copy src string into dest while escaping quotes with double quotes. /* Copy src string into dest while escaping quotes with double quotes.
* dest could be as long as strlen(src)*2. * dest could be as long as strlen(src)*2.
* Return value is the number of chars written to dest. */ * Return value is the number of chars written to dest. */
skipping to change at line 473 skipping to change at line 470
/* This copies the database (pdb, or prc) and writes the DBInfo privided /* This copies the database (pdb, or prc) and writes the DBInfo privided
* since there is no other way to set it in a file. */ * since there is no other way to set it in a file. */
int pdb_file_write_dbinfo(char *DB_name, struct DBInfo *Pinfo_in); int pdb_file_write_dbinfo(char *DB_name, struct DBInfo *Pinfo_in);
void append_anni_years(char *desc, int max, struct tm *date, void append_anni_years(char *desc, int max, struct tm *date,
struct Appointment *a, struct CalendarEvent *cale); struct Appointment *a, struct CalendarEvent *cale);
int get_highlighted_today(struct tm *date); int get_highlighted_today(struct tm *date);
int make_category_menu(GtkWidget **category_menu, int make_category_menu(GtkWidget **category_menu,
GtkWidget **cat_menu_item,
struct sorted_cats *sort_l, struct sorted_cats *sort_l,
void (*selection_callback) void (*selection_callback)
(GtkWidget *item, int selection), (GtkComboBox *item, int selection),
int add_an_all_item, int add_an_all_item,
int add_edit_cat_item); int add_edit_cat_item);
int get_selected_category_from_combo_box(GtkComboBox * box);
int findSortedPostion(int sorted_position,GtkComboBox * box);
int jp_copy_file(char *src, char *dest); int jp_copy_file(char *src, char *dest);
FILE *jp_open_home_file(const char *filename, const char *mode); FILE *jp_open_home_file(const char *filename, const char *mode);
int jp_close_home_file(FILE *pc_in); int jp_close_home_file(FILE *pc_in);
/* Routines used for i18n string manipulation */ /* Routines used for i18n string manipulation */
void multibyte_safe_strncpy(char *dst, char *src, size_t len); void multibyte_safe_strncpy(char *dst, char *src, size_t len);
char *multibyte_safe_memccpy(char *dst, const char *src, int c, size_t len); char *multibyte_safe_memccpy(char *dst, const char *src, int c, size_t len);
/* host character set of J-Pilot (j) to Palm character set (p) */ /* host character set of J-Pilot (j) to Palm character set (p) */
 End of changes. 13 change blocks. 
30 lines changed or deleted 29 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)