* USA.
*/
-#include "config.h"
+#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
{
char *p;
char *s = g_strdup(base);
+ char *q=s;
/* don't eat C++ :: thingies */
if (for_cpp && strstr (s, "::") != NULL)
return s;
- while((p = strchr(s, ':')))
- strcpy(p, p+1);
+ for(p=(char *)base;*p;p++){
+ if (*p!=':')
+ *q++=*p;
+ }
+ *q='\0';
return s;
}
if (for_cpp && strstr (s, "::") != NULL)
return s;
- while((p=strchr(s,':')))
- *p = r;
+ if (r == '\0') {
+ while ((p=strchr(s,':')) != NULL) {
+ char *t = p;
+ while (*t != '\0') {
+ *t = *(t+1);
+ t++;
+ }
+ }
+ } else {
+ while ((p=strchr(s,':')) != NULL)
+ *p = r;
+ }
if(*s == r) {
p = g_strdup(s+1);
g_free(s);
init_type_hash ();
- gtype = g_hash_table_lookup (type_hash, type);
+ if(strncmp(type, "BOXED_", 6) == 0)
+ gtype = g_hash_table_lookup (type_hash, "BOXED");
+ else
+ gtype = g_hash_table_lookup (type_hash, type);
if (gtype == NULL ||
(simple_only &&
return str;
}
+int
+gob_strcasecmp(const char *s1, const char *s2)
+{
+ return g_ascii_strcasecmp(s1, s2);
+}
+
+char *
+gob_str_delete_quotes(char *str)
+{
+ char *p, *i;
+ p=i=str;
+ while(*p!='\0')
+ {
+ if(*p=='\"')
+ {
+ p++;
+ continue;
+ }
+ *i=*p;
+ p++; i++;
+ }
+ *i=*p;
+ return str;
+}
+
char *
make_me_type (const char *type, const char *alt)
{