-
Notifications
You must be signed in to change notification settings - Fork 0
/
pilot-datebook-update.h
72 lines (47 loc) · 1.89 KB
/
pilot-datebook-update.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Pilot Datebook processing utility
* Matthias Hessler <[email protected]> December 2000
*
* This is free software, licensed under the GNU Public License V2.
* See the file COPYING for details.
*/
#ifndef _PILOT_DATEBOOK_UPDATE
#define _PILOT_DATEBOOK_UPDATE
#include "pilot-datebook-data.h"
/* Data structures */
/* Update assign structure */
struct update_assign_data {
struct update_assign_data * next;
struct assign_data assign;
/* Statistics */
unsigned long num_updated;
};
/* Update header structure */
struct update_data {
/* Update assigns */
struct update_assign_data * assign_top;
struct update_assign_data * assign_last;
/* For statistics */
unsigned long records_updated;
};
/* Function definitions */
/* Public */
/* Init & destroy */
int update_init (struct update_data * updatelist, char * opt_arg);
void update_exit (struct update_data * updatelist);
int update_set_param (struct update_data * updatelist, char opt, char * opt_arg);
/* For reading & writing */
void update_row (struct update_data * updatelist, struct row_data * row);
/* For statistics */
void update_show_statistics (struct update_data * data);
/* Private */
/* Helper */
void updatelist_assign_add(struct update_data * updatelist, struct update_assign_data * add_update_assign);
void updatelist_assign_del(struct update_data * updatelist, struct update_assign_data * del_update_assign);
struct update_assign_data * updatelist_get_first_assign(struct update_data * updatelist);
struct update_assign_data * updatelist_get_next_assign(struct update_data * updatelist, struct update_assign_data * cur_update_assign);
struct update_assign_data * update_new_assign (void);
void update_free_assign (struct update_assign_data * update_assign);
void update_row_assign(struct update_assign_data * update_assign, struct row_data * update_row);
char * update_find_delimiter (char * pos1);
#endif