20 #define AWAR_SPECIES_JOIN_FIELD "/tmp/NT/species_join/field"
21 #define AWAR_SPECIES_JOIN_SEP "/tmp/NT/species_join/separator"
22 #define AWAR_SPECIES_JOIN_SEP2 "/tmp/NT/species_join/separator_sequences"
27 if (dtype != stype)
return NULp;
34 !error && gb_source_field;
38 if (!strcmp(source_field,
"name"))
continue;
50 else error =
nt_species_join(gb_dest_container, gb_source_field, 0, sep, sep2);
64 if (strcmp(sf, df) != 0) {
66 const char *spacers =
" ";
73 for (i = strlen(df)-1; i>=0; i--) {
74 if (strchr(spacers, df[i])) df[i] = 0;
78 for (i=0; i<end; i++) {
79 if (!strchr(spacers, sf[i]))
break;
81 char *
str =
new char [strlen(sf) + strlen(df) + strlen(s) + 1];
82 sprintf(str,
"%s%s%s", df, s, sf+i);
111 gb_species && !error;
112 gb_species = gb_next)
126 if (!error) error =
GB_delete(gb_species);
144 static AW_window_simple *aws =
NULp;
150 aws =
new AW_window_simple;
151 aws->init(root,
"SPECIES_JOIN",
"JOIN SPECIES");
152 aws->load_xfig(
"join_species.fig");
156 aws->create_button(
"CLOSE",
"CLOSE",
"C");
159 aws->create_button(
"HELP",
"HELP",
"H");
169 aws->help_text(
"species_join.hlp");
170 aws->create_button(
"GO",
"GO",
"G");
GB_ERROR GB_begin_transaction(GBDATA *gbd)
GB_ERROR GB_copy_dropProtectMarksAndTempstate(GBDATA *dest, GBDATA *source)
GBDATA * GBT_first_marked_species(GBDATA *gb_main)
static void species_rename_join(AW_window *aww)
GBDATA * GB_child(GBDATA *father)
long GBS_write_hash(GB_HASH *hs, const char *key, long val)
GB_ERROR GB_write_string(GBDATA *gbd, const char *s)
void GB_end_transaction_show_error(GBDATA *gbd, GB_ERROR error, void(*error_handler)(GB_ERROR))
char * GB_read_as_string(GBDATA *gbd)
void AW_POPDOWN(AW_window *window)
void GBS_free_hash(GB_HASH *hs)
GB_ERROR GB_delete(GBDATA *&source)
void create_itemfield_selection_button(AW_window *aws, const FieldSelDef &selDef, const char *at)
GB_ERROR GB_await_error()
GBDATA * GB_create_container(GBDATA *father, const char *key)
WindowCallback makeHelpCallback(const char *helpfile)
GB_TYPES GB_read_type(GBDATA *gbd)
#define AWAR_SPECIES_JOIN_FIELD
GB_CSTR GB_read_key_pntr(GBDATA *gbd)
GBDATA * GB_create(GBDATA *father, const char *key, GB_TYPES type)
#define AWAR_SPECIES_JOIN_SEP
static GB_ERROR nt_species_join(GBDATA *dest, GBDATA *source, int deep, char *sep, char *sep2)
static void error(const char *msg)
GBDATA * GBT_next_marked_species(GBDATA *gb_species)
char * read_string() const
AW_awar * awar(const char *awar)
long GBT_count_marked_species(GBDATA *gb_main)
AW_window * NT_create_species_join_window(AW_root *root)
char * GB_read_string(GBDATA *gbd)
ItemSelector & SPECIES_get_selector()
void aw_message(const char *msg)
GBDATA * GB_nextChild(GBDATA *child)
AW_awar * awar_string(const char *var_name, const char *default_value="", AW_default default_file=AW_ROOT_DEFAULT)
long GBS_read_hash(const GB_HASH *hs, const char *key)
GBDATA * GB_entry(GBDATA *father, const char *key)
void inc_and_check_user_abort(GB_ERROR &error)
CONSTEXPR long FIELD_FILTER_STRING_READABLE
GB_HASH * GBS_create_hash(long estimated_elements, GB_CASE case_sens)
#define AWAR_SPECIES_JOIN_SEP2
GB_write_int const char s