Back to index

plt-scheme  4.2.1
Defines | Functions
declarefunc.c File Reference
#include <config.h>
#include <stdio.h>
#include <libit/unistd.h>
#include <libit/string.h>
#include <libit/ctype.h>
#include <wbuild.h>
#include <wsym.h>
#include <libintl.h>
#include <libit/malloc.h>

Go to the source code of this file.


#define fputS(s, f)   fputs(get(s), f)
#define _(String)   gettext(String)


void declare_function (int export, STRING name, Decl d, FILE *f)

Define Documentation

#define _ (   String)    gettext(String)

Definition at line 33 of file declarefunc.c.

#define fputS (   s,
)    fputs(get(s), f)

Definition at line 19 of file declarefunc.c.

Function Documentation

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);
              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);
                            fputS(d1->type, f);
                     if (d1->suffix)
                            fprintf(f, " %s%s", get(d1->name),
                     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: