/* drwChoices */


#ifdef __cplusplus 
extern "C" {
#endif

extern void drw_set_choices_dir_data(char *dirname,
                                     char *leafname,
                                     int usedrwimpc);
extern char *drw_get_choices_dir_name(int choices_read,
                                      int cr_if_nf);
extern char *drw_choices_file(drw_choices_file_type choicesfiletype,
                              int cr_if_nf,
                              char *fullname,
                              int userchoicestype);
extern int drw_get_choices_file_size(int choices_read,
                                     int userchoicestype);
extern int drw_get_choices_file_size_fn(drw_choices_file_type choicesfiletype,
                                        char *fullname,
                                        int userchoicestype);
extern int drw_read_choices_file(drw_choices_file_type choicesfiletype,
                                 void *choicesdata,
                                 char *fullname,
                                 int userchoicestype);
extern int drw_read_choices_file_fn(drw_choices_file_type choicesfiletype,
                                    void *choicesdata,
                                    char *fullname,
                                    int userchoicestype);
extern int drw_write_choices_file(drw_choices_file_type choicesfiletype,
                                  void *choicesdata,
                                  int choicesdatasize,
                                  int cr_if_nf,
                                  int appendtofile,
                                  char *fullname,
                                  int userchoicestype);
extern int drw_write_choices_file_fn(drw_choices_file_type choicesfiletype,
                                     void *choicesdata,
                                     int choicesdatasize,
                                     int cr_if_nf,
                                     int appendtofile,
                                     char *fullname,
                                     int userchoicestype);
extern int drw_read_next_tagged_choice(FILE *fd,
                                       int userchoicestype,
                                       char *elp,
                                       char *fname);
extern os_error *drw_write_choices_file_hdr(FILE *fd,
                                            char *appname);
extern FILE *drw_open_choices_file(char *filemode,
                                   drw_choices_file_type choicesfiletype,
                                   int cr_if_nf,
                                   int writehdr,
                                   char *appname,
                                   char *fullname,
                                   int userchoicestype,
                                   size_t *flenout,
                                   char *elp,
                                   char **fnameout,
                                   os_error **rtnoe);
extern int drw_read_tagged_choices_file(drw_choices_file_type choicesfiletype,
                                        int userchoicestype,
                                        char *fullname);
extern int
       drw_read_tagged_choices_file_fn(drw_choices_file_type choicesfiletype,
                                       char *fullname,
                                       int userchoicestype);
extern int drw_count_tagged_choices(char *tagname,
                                    drw_choices_file_type choicesfiletype,
                                    char *fullname,
                                    int userchoicestype);
extern int drw_count_tagged_choices_fn(char *tagname,
                                       drw_choices_file_type choicesfiletype,
                                       char *fullname,
                                       int userchoicestype);
extern int drw_get_tagged_choice(char *tag,
                                 int taglen,
                                 char *wkbuff,
                                 int wkbuffsize,
                                 drw_choices_file_type choicesfiletype,
                                 char *appname,
                                 char *fullname,
                                 int userchoicestype);
extern int drw_find_choice(char *tag,
                           int taglen,
                           FILE *fd,
                           char *wkbuff,
                           int wkbuffsize,
                           int userchoicestype,
                           char *elp,
                           char *fname);
extern int drw_find_choice_fn(char *tag,
                              int taglen,
                              FILE *fd,
                              char *wkbuff,
                              int wkbuffsize,
                              drw_choices_file_type choicesfiletype,
                              char *fullname,
                              int userchoicestype,
                              char *elp,
                              char *fname);
extern int drw_write_new_choices_file_fn(drw_choices_file_type choicesfiletype,
                                         char *changedchoicesfile,
                                         char *appname,
                                         char *fullname,
                                         int userchoicestype);
extern int drw_write_tagged_choice_serial(
                    drw_choices_file_type choicesfiletype,
                                          char *appname,
                                          char *fullname,
                                          int userchoicestype);
extern int drw_write_tagged_choice_serial_fn(
                              drw_choices_file_type choicesfiletype,
                                             char *appname,
                                             char *fullname,
                                             int userchoicestype);
extern void drw_save_file_to_choices(char *fullname,
                                     char *subdirname,
                                     char *leafname);
void drw_set_choice_to_delete(char *choicetagname);

#ifdef __cplusplus
}
#endif

