X-Git-Url: http://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/4f7cfa972623842e64e3a8468696f1f6f40fd202..509cf0693fc440c71bdd3e71ea8947a6b4eb0bcf:/src/util.c diff --git a/src/util.c b/src/util.c index 03f1b71..e47be5e 100644 --- a/src/util.c +++ b/src/util.c @@ -1,5 +1,6 @@ /* GOB C Preprocessor * Copyright (C) 1999-2000 the Free Software Foundation. + * Copyright (C) 2000 Eazel, Inc. * * Author: George Lebl * @@ -237,3 +238,15 @@ setup_special_array(Class *c, gboolean *special_array) return any_special; } + +/* get the id without the first underscore, but only if we're removing them */ +char * +get_real_id(char *id) +{ + if(!no_kill_underscores && + id[0] == '_' && + id[1] != '\0') + return &id[1]; + else + return id; +}