Back to index

plt-scheme  4.2.1
Classes | Defines | Typedefs | Enumerations | Functions | Variables
wbuild.h File Reference
#include <time.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _STRING
struct  _Decl
struct  _Section
struct  _Class
struct  _Doctype

Defines

#define lined(lineno, file)   if (lines) fprintf(f, "#line %d \"%s\"\n", lineno, get(file))
#define warn_if_params(params, filename, lineno, procname)

Typedefs

typedef struct _STRINGSTRING
typedef struct _DeclDecl
typedef struct _SectionSection
typedef struct _ClassClass
typedef char * tagpair [2]
typedef char * taglist [t_privconstraint+1][2]
typedef struct _DoctypeDoctype

Enumerations

enum  DeclTp {
  Undefined, Proc, Var, Type,
  Def, Incl, Trans
}
enum  tagtype {
  t_start, t_class, t_name, t_name2,
  t_filename, t_superclass, t_publicvars, t_privatevars,
  t_actions, t_translations, t_exports, t_methods,
  t_imports, t_utilities, t_classvars, t_section,
  t_macro, t_publicvar, t_action, t_code,
  t_table, t_tablehead, t_row, t_resname,
  t_resclass, t_restype, t_resdefault, t_inline,
  t_underline, t_backslash, t_tilde, t_hashmark,
  t_dollar, t_less, t_greater, t_percent,
  t_caret, t_ampersand, t_lbrace, t_rbrace,
  t_bar, t_at, t_type, t_incl,
  t_constraints, t_constraint, t_privconstraints, t_privconstraint
}

Functions

STRING hash (char *s)
char * get (STRING s)
STRING get_headerPname (char *dir, Class c)
STRING get_classname (STRING s)
STRING get_word (char *s)
STRING get_instname (STRING s)
Class find_instvar_class (Class c, STRING name)
Section find_pubvar (Class c, STRING m)
Section find_pubvar_back (Class c, STRING m)
Class find_constr_class (Class c, STRING name)
Section find_constraint (Class c, STRING m)
Section find_method (Class c, STRING m)
Class find_superclass (Class c, STRING name)
Class find_method_class (Class c, STRING name)
Class find_classvar_class (Class c, STRING name)
int strneq (char *a, char *b, int n)
size_t Strlen (STRING s)
void delete (STRING s)
int has_method (Class c, STRING m)
STRING find_classvar_value (Class c, STRING name)
STRING hdup (STRING s)
void declare_function (int export, STRING name, Decl d, FILE *f)
void wbuild_comment (FILE *f)
void print_body (FILE *f, STRING body, Class class, STRING procname, int lineno, int ismacro)
int set_hierarchy (void)
void public_header (FILE *f, Class c, char *prefix, char *guard)
void generate_private_header (FILE *f, Class c, char *prefix, char *guard)
void symbol_init (void)
void generatec (FILE *f, Class c, char *prefix, int lines)
void generate_doc (FILE *f, tagpair *tag, Class c, int shortdoc)
void add_class (Class c)
void add_doctype (Doctype d)
void copy_taglist (taglist *dest, taglist *src)
void zero_taglist (taglist *dest)
void set_doctag (taglist tag, char *name, char *open, char *close)
STRING catstr (va_alist)

Variables

int nerrors
Doctype doctypes
Class classes
int classnodoc
int classnocode
int doctypeshort
STRING classfilename
STRING doctypeext
STRING doctypedir

Class Documentation

struct _STRING

Definition at line 44 of file wbuild.h.

Collaboration diagram for _STRING:
Class Members
int linkcount
struct _STRING * next
char * s
struct _Decl

Definition at line 118 of file wbuild.h.

Collaboration diagram for _Decl:
Class Members
STRING body
STRING class_id
int lineno
STRING name
STRING namesym
struct _Decl * next
struct _Decl * params
STRING suffix
DeclTp tp
STRING type
STRING typesym
STRING value
STRING valuesym
struct _Section

Definition at line 136 of file wbuild.h.

Collaboration diagram for _Section:
Class Members
Decl decl
struct _Section * next
STRING text
struct _Class

Definition at line 148 of file wbuild.h.

Collaboration diagram for _Class:
Class Members
Section actions
Section classvars
Section constraints
struct _Class * daughters
Section exports
STRING filename
STRING filenamepart
time_t filetime
Section imports
int lineno
Section methods
STRING name
struct _Class * next
int nocode
int nodoc
Section privatevars
Section privconstr
Section publicvars
struct _Class * sister
struct _Class * super
STRING superclass
STRING text
Section translations
Section utilities
struct _Doctype

Definition at line 179 of file wbuild.h.

Collaboration diagram for _Doctype:
Class Members
struct _Doctype * next
int shortdoc
taglist tag

Define Documentation

#define lined (   lineno,
  file 
)    if (lines) fprintf(f, "#line %d \"%s\"\n", lineno, get(file))

Definition at line 238 of file wbuild.h.

#define warn_if_params (   params,
  filename,
  lineno,
  procname 
)
Value:
if (params != NULL)                                     \
              nerrors++,                                       \
              fprintf(stderr,                                         \
                     _("%s:%d: Parameter list of `%s' ignored\n"),    \
                     get(filename), lineno, get(procname))

Definition at line 241 of file wbuild.h.


Typedef Documentation

typedef struct _Class * Class
typedef struct _Decl * Decl
typedef struct _Doctype * Doctype
typedef struct _Section * Section
typedef struct _STRING * STRING
typedef char* taglist[t_privconstraint+1][2]

Definition at line 177 of file wbuild.h.

typedef char* tagpair[2]

Definition at line 176 of file wbuild.h.


Enumeration Type Documentation

enum DeclTp
Enumerator:
Undefined 
Proc 
Var 
Type 
Def 
Incl 
Trans 

Definition at line 117 of file wbuild.h.

enum tagtype
Enumerator:
t_start 
t_class 
t_name 
t_name2 
t_filename 
t_superclass 
t_publicvars 
t_privatevars 
t_actions 
t_translations 
t_exports 
t_methods 
t_imports 
t_utilities 
t_classvars 
t_section 
t_macro 
t_publicvar 
t_action 
t_code 
t_table 
t_tablehead 
t_row 
t_resname 
t_resclass 
t_restype 
t_resdefault 
t_inline 
t_underline 
t_backslash 
t_tilde 
t_hashmark 
t_dollar 
t_less 
t_greater 
t_percent 
t_caret 
t_ampersand 
t_lbrace 
t_rbrace 
t_bar 
t_at 
t_type 
t_incl 
t_constraints 
t_constraint 
t_privconstraints 
t_privconstraint 

Definition at line 162 of file wbuild.h.


Function Documentation

Definition at line 342 of file util.c.

{
       c->next = classes;
       classes = c;
}

Definition at line 82 of file util.c.

{
       d->next = doctypes;
       doctypes = d;
}
STRING catstr ( va_alist  )

Definition at line 570 of file util.c.

{
       va_list ap;
#if !HAVE_STDARG_H
       int n;
#endif /* !HAVE_STDARG_H */
       unsigned int len = 0;
       char *s, *s1;
       STRING t;
       int i;

#ifdef HAVE_STDARG_H
       va_start(ap, n);
#else /* !HAVE_STDARG_H */
       va_start(ap);
       n = va_arg(ap, int);
#endif /* !HAVE_STDARG_H */
       if (n == 0) {
              va_end(ap);
              return 0;
       } else {
              for (i = n; i > 0; i--) {
                     s1 = va_arg(ap, char *);
                     len += s1 ? strlen(s1) : 0;
              }
              va_end(ap);
              s = xmalloc((len + 2) * sizeof(char));
              s[0] = '\0';
#if HAVE_STDARG_H
              va_start(ap, n);
#else /* !HAVE_STDARG_H */
              va_start(ap);
              n = va_arg(ap, int);
#endif /* !HAVE_STDARG_H */
              for (i = n; i > 0; i--) {
                     s1 = va_arg(ap, char *);
                     if (s1) strcat(s, s1);
              }
              va_end(ap);
              t = hash(s);
              return t;
       }
}

Here is the call graph for this function:

void copy_taglist ( taglist dest,
taglist src 
)

Definition at line 62 of file util.c.

{
       int i;

       for (i = 0; i <= t_privconstraint; i++) {
              (*dest)[i][0] = (*src)[i][0];
              (*dest)[i][1] = (*src)[i][1];
       }
}
void declare_function ( int  export,
STRING  name,
Decl  d,
FILE *  f 
)

Definition at line 42 of file declarefunc.c.

{
       Decl d1;

       if (!export)
              fputs("static ", f);

       if (d->type)
              fputS(d->type, f);
       else
              fputs("void", f);

       putc(' ', f);
       fputS(name, f);
       fputs("(\n#if NeedFunctionPrototypes\n", f);
       if (!d->params) {
              fputs("void", f);
       } else {
              for (d1 = d->params; d1; d1 = d1->next) {
                     if (d1->name == DOLLAR)
                            fputs("Widget", f);
                     else
                            fputS(d1->type, f);
                     if (d1->suffix)
                            fprintf(f, " %s%s", get(d1->name),
                                   get(d1->suffix));
                     if (d1->next) (void) putc(',', f);
              }
       }
       fputs("\n#endif\n);\n", f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void delete ( STRING  s)

Definition at line 504 of file util.c.

{
#if 0
#ifdef NDEBUG
       int h; STRING t;
#endif /*NDEBUG*/

       if (!s)
              return;

       s->linkcount--;
       if (s->linkcount > 0)
              return; /* still in use elsewhere */

#ifdef NDEBUG
       h = hashval(s->s);
       if (hashtable[h] == s)
              hashtable[h] = s->next;
       else {
              for (t = hashtable[h]; t->next != s; t = t->next) ;
              t->next = s->next;
       }
       if (s->s)
              free(s->s);
       free(s);
#else /*NDEBUG*/
       if (s->linkcount < 0)
              debug(("linkcount on %s is %d\n", s->s, s->linkcount));
#endif /*NDEBUG*/
#endif
}

Here is the call graph for this function:

Definition at line 862 of file util.c.

{
       Class h;
       Section d;
       if (!c)
              return NULL;
       if ((h = find_classvar_class(c->super, name)))
              return h;
       for (d = c->classvars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return c;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1033 of file util.c.

{
       Section d;

       for (d = c->classvars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return d->decl->value;
       if (c->super)
              return find_classvar_value(c->super, name);
       else
              return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Class find_constr_class ( Class  c,
STRING  name 
)

Definition at line 894 of file util.c.

{
       Class h;
       Section d;

       if (!c)
              return 0;
       if ((h = find_constr_class(c->super, name)))
              return h;
       for (d = c->constraints; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return c;
       for (d = c->privconstr; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return c;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1012 of file util.c.

{
       Section d, h;

       if (!c)
              return 0;
       if ((h = find_constraint(c->super, m)))
              return h;
       for (d = c->constraints; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == m)
                     return d;
       for (d = c->privconstr; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == m)
                     return d;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Class find_instvar_class ( Class  c,
STRING  name 
)

Definition at line 876 of file util.c.

{
       Class h;
       Section d;

       if (!c)
              return 0;
       if ((h = find_instvar_class(c->super, name)))
              return h;
       for (d = c->publicvars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return c;
       for (d = c->privatevars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == name)
                     return c;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Section find_method ( Class  c,
STRING  m 
)

Definition at line 931 of file util.c.

{
       Section d, h;

       if (!c)
              return 0;
       if ((h = find_method(c->super, m)))
              return h;
       for (d = c->methods; d; d = d->next)
              if (d->decl && d->decl->tp == Proc && d->decl->name == m)
                     return d;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Class find_method_class ( Class  c,
STRING  name 
)

Definition at line 912 of file util.c.

{
       Class h;
       Section d;

       if (!c)
              return 0;
       if ((h = find_method_class(c->super, name)))
              return h;
       for (d = c->methods; d; d = d->next)
              if (d->decl && d->decl->tp == Proc && d->decl->name == name)
                     return c;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Section find_pubvar ( Class  c,
STRING  m 
)

Definition at line 976 of file util.c.

{
       Section d, h;

       if (!c)
              return 0;
       if ((h = find_pubvar(c->super, m)))
              return h;
       for (d = c->publicvars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == m)
                     return d;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 994 of file util.c.

{
       Section d, h;

       if (!c)
              return 0;
       for (d = c->publicvars; d; d = d->next)
              if (d->decl && d->decl->tp == Var && d->decl->name == m)
                     return d;
       if ((h = find_pubvar(c->super, m)))
              return h;
       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Class find_superclass ( Class  c,
STRING  name 
)

Definition at line 844 of file util.c.

{
       if (!c)
              return 0;
       else if (c->name == name)
              return c;
       else
              return find_superclass(c->super, name);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void generate_doc ( FILE *  f,
tagpair tag,
Class  c,
int  shortdoc 
)

Definition at line 810 of file generatedoc.c.

{
       fputs(topen(t_start), f);
       chapter_title_intro(f, tag, c);
       public_variables(f, tag, c, shortdoc);
       summary_inherited_resources(f, tag, c);
       constraint_resources(f, tag, c, shortdoc);
       exports(f, tag, c, shortdoc);
       default_translations(f, tag, c);
       actions(f, tag, c, shortdoc);
       if (!shortdoc) {
              imports(f, tag, c);
              private_variables(f, tag, c);
              private_constraint_variables(f, tag, c);
              private_class_variables(f, tag, c);
              private_methods(f, tag, c);
              utilities(f, tag, c);
       }
       fputs(tclose(t_start), f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void generate_private_header ( FILE *  f,
Class  c,
char *  prefix,
char *  guard 
)

Definition at line 746 of file generateh.c.

{
       wbuild_comment(f);
       fprintf(f, "#ifndef %s\n", guard);
       fprintf(f, "#define %s\n", guard);
       public_include(f, c, prefix, "P");
       fprintf(f, "#include <%s/%s.h>\n", prefix,
              get(c->filenamepart ? c->filenamepart : c->name));
       fputs("_XFUNCPROTOBEGIN\n", f);
       generate_macro(f, c);
       generate_typedefs(f, c);
       generate_inherit_defines(f, c);
       if (find_superclass(c, CONSTRAINT) != NULL) {
              generate_constraint_part_record(f, c);
              generate_constraint_rec(f, c);
       }
       generate_class_part_rec(f, c);
       generate_class_rec(f, c);
       generate_instance_part_rec(f, c);
       generate_complete_instance_part_rec(f, c);
       generate_extern_decl_class_rec(f, c);
       fputs("_XFUNCPROTOEND\n", f);
       fprintf(f, "#endif /* %s */\n", guard);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void generatec ( FILE *  f,
Class  c,
char *  prefix,
int  lines 
)

Definition at line 1122 of file generatec.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* get ( STRING  s)

Definition at line 541 of file util.c.

{
       if (!s)
              return "";
       else
              return s->s;
}

Definition at line 631 of file util.c.

{
       char *h, *h1;
       STRING t;
       h = h1 = xstrdup(s->s);
       if (*h == '$') h++;
       if ('a' <= h[0] && h[0] <= 'z') h[0] += 'A' - 'a';
       if (h[0] == 'X' && 'a' <= h[1] && h[1] <= 'z') h[1] += 'A' - 'a';
       t = hash(h); free(h1);
       return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

STRING get_headerPname ( char *  dir,
Class  c 
)

Definition at line 750 of file util.c.

{
       char *s;
       static STRING file = 0;
       STRING t;

       if (!file)
              file = hash("file");

       s = xmalloc((dir != NULL ? strlen(dir) : 0) + 16);
       if (dir != NULL && dir[0] != '\0') {
              strcpy(s, dir);
              if (dir[strlen(dir)-1] != '/')
                     strcat(s, "/");
       }
       if (c->filenamepart)
              t = c->filenamepart;
       else
              t = c->name;
       /* strncat(s, get(t), 9); */
       strcat(s, get(t));
       strcat(s, "P.h");
       t = hash(s);
       free(s);
       return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 650 of file util.c.

{
       char *h, *h1;
       STRING t;
       h = h1 = xstrdup(s->s);
       if (*h == '$') h++;
       if ('A' <= h[0] && h[0] <= 'Z') h[0] += 'a' - 'A';
       if (h[0] == 'x' && 'A' <= h[1] && h[1] <= 'Z') h[1] += 'a' - 'A';
       t = hash(h); free(h1);
       return t;
}

Here is the call graph for this function:

Here is the caller graph for this function:

STRING get_word ( char *  s)

Definition at line 667 of file util.c.

{
       char *word;
       STRING t;
       int i;

       if (!s)
              return 0;
       else {
              word = xmalloc(sizeof(char) * strlen(s) + 1);
              for (i = 0; isalnum(s[i]) || s[i] == '_'; i++)
                     word[i] = s[i];
              word[i] = '\0';
              t = hash(word);
              free(word);
              return t;
       }
}

Here is the call graph for this function:

Here is the caller graph for this function:

int has_method ( Class  c,
STRING  m 
)

Definition at line 950 of file util.c.

{
       Section d;
       for (d = c->methods; d; d = d->next)
              if (d->decl && d->decl->tp == Proc && d->decl->name == m)
                     return 1;
       return 0;
}

Here is the caller graph for this function:

STRING hash ( char *  s)

Definition at line 454 of file util.c.

{
       int h;
       STRING t;

       if (!s || s[0] == '\0')
              return 0;

       h = hashval(s);
       if (! valid(h)) {
              new(t);
              t->s = xstrdup(s);
              t->linkcount = 1;
              t->next = 0;
              do {
                     r2[h] = nused;
                     r1[nused] = h;
                     nused++;
              } while (0);
              hashtable[h] = t;
              return t;
       }
       for (t = hashtable[h]; t; t = t->next) {
              if (strcmp(t->s, s) == 0) {
                     t->linkcount++;
                     return t;
              }
       }
       new(t);
       t->s = xstrdup(s);
       t->linkcount = 1;
       t->next = hashtable[h];
       hashtable[h] = t;
       return t;
}

Here is the call graph for this function:

STRING hdup ( STRING  s)

Definition at line 550 of file util.c.

{
       if (!s)
              return 0;
       s->linkcount++;
       return s;
}

Here is the caller graph for this function:

void print_body ( FILE *  f,
STRING  body,
Class  class,
STRING  procname,
int  lineno,
int  ismacro 
)

Definition at line 221 of file printbody.c.

{
       char *p, prev = '\0';
       int quoted = 0, squoted = 0, comment = 0;

       for (p = get(body); *p; prev = prev == '\\' ? '\0' : *p, p++)
              switch (*p) {
                     case '"':
                            putc('"', f);
                            if (! squoted && ! comment && prev != '\\')
                                   quoted = ! quoted;
                            break;
                     case '\'':
                            putc('\'', f);
                            if (! quoted && ! comment && prev != '\\')
                                   squoted = ! squoted;
                            break;
                     case '*':
                            putc('*', f);
                            if (! quoted && ! squoted && ! comment &&
                                   (prev == '/'))
                                          comment = 1;
                            break;
                     case '/':
                            putc('/', f);
                            if (comment && prev == '*')
                                   comment = 0;
                            break;
                     case '$':
                            if (quoted || squoted || comment ||
                                   (prev == '\\'))
                                          putc('$', f);
                            else {
                                   p = expand_word_p(f, p, class, lineno,
                                          procname);
                            }
                            break;
                     case '#':
                            if (quoted || squoted || comment ||
                                   (prev == '\\'))
                                          putc('#', f);
                            else if (prev == '\n'
                                   && ((strneq(p, "#ifdef", 6) && !isalnum(p[6]))
                                   || (strneq(p, "#ifndef", 7) && !isalnum(p[7]))
                                   || (strneq(p, "#if", 3) && !isalnum(p[3]))
                                   || (strneq(p, "#define", 7) && !isalnum(p[7]))
                                   || (strneq(p, "#include", 8) && !isalnum(p[8]))
                                   || (strneq(p, "#undef", 6) && !isalnum(p[6]))
                                   || (strneq(p, "#else", 5) && !isalnum(p[5]))
                                   || (strneq(p, "#endif", 6) && !isalnum(p[6]))))
                                          putc('#', f);
                            else {
                                   p = expand_hash_word_p(f, p, class,
                                          lineno, procname);
                            }
                            break;
                     case '\n':
                            if (ismacro)
                                   putc('\\', f);
                            putc('\n', f);
                            break;
                     default:
                            putc(*p, f);
       }
       putc('\n', f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void public_header ( FILE *  f,
Class  c,
char *  prefix,
char *  guard 
)

Definition at line 297 of file generateh.c.

{
       wbuild_comment(f);
       fprintf(f, "#ifndef %s\n", guard);
       fprintf(f, "#define %s\n", guard);
       public_include(f, c, prefix, "");
       fputs("_XFUNCPROTOBEGIN\n", f);
       declare_exports(f, c);
       define_resource_symbols(f, c);
       define_constraint_resource_symbols(f, c);
       typedef_class_instance(f, c);
       fputs("_XFUNCPROTOEND\n", f);
       fprintf(f, "#endif /* %s */\n", guard);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void set_doctag ( taglist  tag,
char *  name,
char *  open,
char *  close 
)

Definition at line 125 of file util.c.

{
       name = escape_string(name);
       open = escape_string(open);
       close = escape_string(close);
       if (!strcmp("filename", name)) {
              tag[t_filename][0] = strdup(open);
              tag[t_filename][1] = strdup(close);
       }
       if (!strcmp("start", name)) {
              tag[t_start][0] = strdup(open);
              tag[t_start][1] = strdup(close);
       }
       if (!strcmp("class", name)) {
              tag[t_class][0] = strdup(open);
              tag[t_class][1] = strdup(close);
       }
       if (!strcmp("name", name)) {
              tag[t_name][0] = strdup(open);
              tag[t_name][1] = strdup(close);
       }
       if (!strcmp("name2", name)) {
              tag[t_name2][0] = strdup(open);
              tag[t_name2][1] = strdup(close);
       }
       if (!strcmp("superclass", name)) {
              tag[t_superclass][0] = strdup(open);
              tag[t_superclass][1] = strdup(close);
       }
       if (!strcmp("publicvars", name)) {
              tag[t_publicvars][0] = strdup(open);
              tag[t_publicvars][1] = strdup(close);
       }
       if (!strcmp("privatevars", name)) {
              tag[t_privatevars][0] = strdup(open);
              tag[t_privatevars][1] = strdup(close);
       }
       if (!strcmp("actions", name)) {
              tag[t_actions][0] = strdup(open);
              tag[t_actions][1] = strdup(close);
       }
       if (!strcmp("translations", name)) {
              tag[t_translations][0] = strdup(open);
              tag[t_translations][1] = strdup(close);
       }
       if (!strcmp("exports", name)) {
              tag[t_exports][0] = strdup(open);
              tag[t_exports][1] = strdup(close);
       }
       if (!strcmp("methods", name)) {
              tag[t_methods][0] = strdup(open);
              tag[t_methods][1] = strdup(close);
       }
       if (!strcmp("imports", name)) {
              tag[t_imports][0] = strdup(open);
              tag[t_imports][1] = strdup(close);
       }
       if (!strcmp("utilities", name)) {
              tag[t_utilities][0] = strdup(open);
              tag[t_utilities][1] = strdup(close);
       }
       if (!strcmp("classvars", name)) {
              tag[t_classvars][0] = strdup(open);
              tag[t_classvars][1] = strdup(close);
       }
       if (!strcmp("section", name)) {
              tag[t_section][0] = strdup(open);
              tag[t_section][1] = strdup(close);
       }
       if (!strcmp("macro", name)) {
              tag[t_macro][0] = strdup(open);
              tag[t_macro][1] = strdup(close);
       }
       if (!strcmp("publicvar", name)) {
              tag[t_publicvar][0] = strdup(open);
              tag[t_publicvar][1] = strdup(close);
       }
       if (!strcmp("action", name)) {
              tag[t_action][0] = strdup(open);
              tag[t_action][1] = strdup(close);
       }
       if (!strcmp("code", name)) {
              tag[t_code][0] = strdup(open);
              tag[t_code][1] = strdup(close);
       }
       if (!strcmp("table", name)) {
              tag[t_table][0] = strdup(open);
              tag[t_table][1] = strdup(close);
       }
       if (!strcmp("tablehead", name)) {
              tag[t_tablehead][0] = strdup(open);
              tag[t_tablehead][1] = strdup(close);
       }
       if (!strcmp("row", name)) {
              tag[t_row][0] = strdup(open);
              tag[t_row][1] = strdup(close);
       }
       if (!strcmp("resname", name)) {
              tag[t_resname][0] = strdup(open);
              tag[t_resname][1] = strdup(close);
       }
       if (!strcmp("resclass", name)) {
              tag[t_resclass][0] = strdup(open);
              tag[t_resclass][1] = strdup(close);
       }
       if (!strcmp("restype", name)) {
              tag[t_restype][0] = strdup(open);
              tag[t_restype][1] = strdup(close);
       }
       if (!strcmp("resdefault", name)) {
              tag[t_resdefault][0] = strdup(open);
              tag[t_resdefault][1] = strdup(close);
       }
       if (!strcmp("inline", name)) {
              tag[t_inline][0] = strdup(open);
              tag[t_inline][1] = strdup(close);
       }
       if (!strcmp("underline", name)) {
              tag[t_underline][0] = strdup(open);
              tag[t_underline][1] = strdup(close);
       }
       if (!strcmp("backslash", name)) {
              tag[t_backslash][0] = strdup(open);
              tag[t_backslash][1] = strdup(close);
       }
       if (!strcmp("tilde", name)) {
              tag[t_tilde][0] = strdup(open);
              tag[t_tilde][1] = strdup(close);
       }
       if (!strcmp("hashmark", name)) {
              tag[t_hashmark][0] = strdup(open);
              tag[t_hashmark][1] = strdup(close);
       }
       if (!strcmp("dollar", name)) {
              tag[t_dollar][0] = strdup(open);
              tag[t_dollar][1] = strdup(close);
       }
       if (!strcmp("less", name)) {
              tag[t_less][0] = strdup(open);
              tag[t_less][1] = strdup(close);
       }
       if (!strcmp("greater", name)) {
              tag[t_greater][0] = strdup(open);
              tag[t_greater][1] = strdup(close);
       }
       if (!strcmp("percent", name)) {
              tag[t_percent][0] = strdup(open);
              tag[t_percent][1] = strdup(close);
       }
       if (!strcmp("caret", name)) {
              tag[t_caret][0] = strdup(open);
              tag[t_caret][1] = strdup(close);
       }
       if (!strcmp("ampersand", name)) {
              tag[t_ampersand][0] = strdup(open);
              tag[t_ampersand][1] = strdup(close);
       }
       if (!strcmp("lbrace", name)) {
              tag[t_lbrace][0] = strdup(open);
              tag[t_lbrace][1] = strdup(close);
       }
       if (!strcmp("rbrace", name)) {
              tag[t_rbrace][0] = strdup(open);
              tag[t_rbrace][1] = strdup(close);
       }
       if (!strcmp("bar", name)) {
              tag[t_bar][0] = strdup(open);
              tag[t_bar][1] = strdup(close);
       }
       if (!strcmp("at", name)) {
              tag[t_at][0] = strdup(open);
              tag[t_at][1] = strdup(close);
       }
       if (!strcmp("type", name)) {
              tag[t_type][0] = strdup(open);
              tag[t_type][1] = strdup(close);
       }
       if (!strcmp("incl", name)) {
              tag[t_incl][0] = strdup(open);
              tag[t_incl][1] = strdup(close);
       }
       if (!strcmp("constraints", name)) {
              tag[t_constraints][0] = strdup(open);
              tag[t_constraints][1] = strdup(close);
       }
       if (!strcmp("constraint", name)) {
              tag[t_constraint][0] = strdup(open);
              tag[t_constraint][1] = strdup(close);
       }
       if (!strcmp("privconstraints", name)) {
              tag[t_privconstraints][0] = strdup(open);
              tag[t_privconstraints][1] = strdup(close);
       }
       if (!strcmp("privconstraint", name)) {
              tag[t_privconstraint][0] = strdup(open);
              tag[t_privconstraint][1] = strdup(close);
       }
       free(open);
       free(close);
       free(name);
}

Here is the call graph for this function:

Definition at line 1090 of file util.c.

{
       Class c, c1;
       char *p;
       int err = 0;

       for (c = classes; c; c = c->next) {
              if ((p = strrchr(get(c->superclass), '/')))
                     c->super = find_class(hash(p + 1));
              else
                     c->super = find_class(c->superclass);
              if (c->super == NULL) {
                     c->sister = toplevel;
                     toplevel = c;
              } else {
                     c->sister = c->super->daughters;
                     c->super->daughters = c;
              }
       }
       for (c = classes; c; c = c->next) {
              for (c1 = c->super; c1; c1 = c1->super) {
                     if (c1 == c) {
                            fprintf(stderr,
                                   _("%s:%d: cyclic dependency found "
                                   "in superclasses of %s\n"),
                                   get(c->filename), c->lineno,
                                   get(c->name));
                            err++;
                            break;
                     }
              }
       }
       return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Strlen ( STRING  s)

Definition at line 619 of file util.c.

{
       return s ? (s->s != NULL ? strlen(s->s) : 0) : 0;
}

Here is the caller graph for this function:

int strneq ( char *  a,
char *  b,
int  n 
)

Definition at line 1128 of file util.c.

{
       if (!a)
              return (!b) || (*b == '\0');
       if (!b)
              return 0;
       while (n && *a && (*a == *b)) {
              a++;
              b++;
              n--;
       }
       return n == 0 || *a == *b /* == '\0' */;
}

Here is the caller graph for this function:

Definition at line 95 of file symbol.c.

{
       SELF = hash("self");
       DOTDOTDOT = hash("...");
       SYN_CONSTRAINT_RESOURCES = hash("syn_constraint_resources");
       NUM_SYN_CONSTRAINT_RESOURCES = hash("num_syn_constraint_resources");
       PARENT_PROCESS = hash("parent_process");
       MANAGER_EXTENSION = hash("manager_extension");
       BORDER_HIGHLIGHT = hash("border_highlight");
       BORDER_UNHIGHLIGHT = hash("border_unhighlight");
       TRANSLATIONS = hash("translations");
       ARM_AND_ACTIVATE = hash("arm_and_activate");
       SYN_RESOURCES = hash("syn_resources");
       NUM_SYN_RESOURCES = hash("num_syn_resources");
       PRIMITIVE_EXTENSION = hash("primitive_extension");
       CONSTRAINT_RESOURCES = hash("constraint_resources");
       CONSTRAINT_SIZE = hash("constraint_size");
       CONSTRAINT_INITIALIZE = hash("constraint_initialize");
       CONSTRAINT_DESTROY = hash("constraint_destroy");
       CONSTRAINT_SET_VALUES = hash("constraint_set_values");
       CONSTRAINT_EXTENSION = hash("constraint_extension");
       GEOMETRY_MANAGER = hash("geometry_manager");
       CHANGE_MANAGED = hash("change_managed");
       INSERT_CHILD = hash("insert_child");
       DELETE_CHILD = hash("delete_child");
       DISPLAY_ACCELERATOR = hash("display_accelerator");  
       QUERY_GEOMETRY = hash("query_geometry");
       CLASS_INITIALIZE = hash("class_initialize");
       CLASS_PART_INITIALIZE = hash("class_part_initialize");
       INITIALIZE = hash("initialize");
       INITIALIZE_HOOK = hash("initialize_hook");
       REALIZE = hash("realize");
       COMPRESS_MOTION = hash("compress_motion");
       COMPRESS_EXPOSURE = hash("compress_exposure");
       COMPRESS_ENTERLEAVE = hash("compress_enterleave");
       VISIBLE_INTEREST = hash("visible_interest");
       DESTROY = hash("destroy");
       RESIZE = hash("resize");
       EXPOSE = hash("expose");
       SET_VALUES = hash("set_values");
       SET_VALUES_HOOK = hash("set_values_hook");
       SET_VALUES_ALMOST = hash("set_values_almost");
       GET_VALUES_HOOK = hash("get_values_hook");
       ACCEPT_FOCUS = hash("accept_focus");
       EXTENSION = hash("extension");
       CORE = hash("Core");
       RECTOBJ = hash("RectObj");
       OBJECT = hash("Object");
       COMPOSITE = hash("Composite");
       SHELL = hash("Shell");
       OVERRIDESHELL = hash("OverrideShell");
       WMSHELL = hash("WMShell");
       VENDORSHELL = hash("VendorShell");
       TRANSIENTSHELL = hash("TransientShell");
       TOPLEVELSHELL = hash("TopLevelShell");
       APPLICATIONSHELL = hash("ApplicationShell");
       CONSTRAINT = hash("Constraint");
       XMPRIMITIVE = hash("Xm/XmPrimitive");
       PRIMITIVE = hash("XmPrimitive");
       XMMANAGER = hash("Xm/Manager");
       MANAGER = hash("XmManager");
       DOLLAR = hash("$");
       action_proto.decl = malloc(sizeof(struct _Decl));
       action_proto.decl->type = hash("void");
       action_proto.decl->params = malloc(sizeof(struct _Decl));
       action_proto.decl->params->type = 0;
       action_proto.decl->params->name = DOLLAR;
       action_proto.decl->params->suffix = 0;
       action_proto.decl->params->next = malloc(sizeof(struct _Decl));
       action_proto.decl->params->next->type = hash("XEvent*");
       action_proto.decl->params->next->name = hash("event");
       action_proto.decl->params->next->suffix = 0;
       action_proto.decl->params->next->next = malloc(sizeof(struct _Decl));
       action_proto.decl->params->next->next->type = hash("String*");;
       action_proto.decl->params->next->next->name = hash("params");
       action_proto.decl->params->next->next->suffix = 0;
       action_proto.decl->params->next->next->next =
              malloc(sizeof(struct _Decl));
       action_proto.decl->params->next->next->next->type = hash("Cardinal*");
       action_proto.decl->params->next->next->next->name = hash("num_params");
       action_proto.decl->params->next->next->next->suffix = 0;
       action_proto.decl->params->next->next->next->next = NULL;
}

Here is the caller graph for this function:

void wbuild_comment ( FILE *  f)

Definition at line 50 of file util.c.

{
       fprintf(f,
              "/* Generated by wbuild\n"
              " * (generator version %s)\n"
              " */\n", "3.2");
}

Here is the caller graph for this function:

void zero_taglist ( taglist dest)

Definition at line 72 of file util.c.

{
       int i;

       for (i = 0; i <= t_privconstraint; i++) {
              (*dest)[i][0] = (*dest)[i][1] = 0;
       }
}

Variable Documentation

Definition at line 333 of file util.c.

Definition at line 335 of file util.c.

Definition at line 334 of file util.c.

Definition at line 334 of file util.c.

Definition at line 60 of file util.c.

Definition at line 58 of file wbuild.c.