#include #include #include "tledit.h" #include "tledit.m" #include "component.h" int main (int argc, char *argv[]) { glocal bool helper = false; glocal bool tags = false; glocal bool intro = false; int ret = (argc, argv, "tlmpwork"); fprintf (stderr,MSG_U(I_COMPSHOWUSAGE ,"component_show [ options ] component ...\n" "\n" "--helper\n" "--intro\n" "--tags\n" )); int ret = 0; if (strcmp(opt,"--helper")==0){ glocal.helper=true; }else if (strcmp(opt,"--tags")==0){ glocal.tags=true; }else if (strcmp(opt,"--intro")==0){ glocal.intro=true; }else{ ret = -1; } return ret; glocal bool found; glocal const char *name; glocal SSTRINGS paths; int ret = 0; (); glocal.paths.add (new SSTRING(path)); for (int i=0; iget(); if (glocal.intro){ (path); if (strcmp(name,glocal.name)==0){ glocal.found = true; printf ("Component %s: %s\n",name,summary); printf ("/*\n%s\n*/\n",descrip); }else{ skip = true; } }else if (glocal.tags){ (path); if (strcmp(name,glocal.name)!=0){ skip = true; } printf ("\t%s\t%s\n",name,summary); }else if (glocal.helper){ (path); if (strcmp(name,glocal.name)!=0){ skip = true; } printf ("\t%s\t%s\t%s\t%s\n",name,rettype,summary,descrip); }else{ (path); printf ("Section %s\n",name); if (strcmp(name,glocal.name)==0){ glocal.found = true; printf ("Component %s: %s\n",name,summary); printf ("/*\n%s\n*/\n",descrip); }else{ skip = true; } printf ("%*.*sFunctag %s return %s %s\n" ,info.level*4,info.level*4,"" ,name,rettype ,optional ? "optional" : ""); printf ("%*.*sFhelper %s return %s\n" ,info.level*4,info.level*4,"" ,name,rettype); printf ("%*.*sParam %s type %s\n" ,info.level*4,info.level*4,"" ,name,type); printf ("%*.*sPrototype %s\n" ,info.level*4,info.level*4,"" ,name); } } } return ret; return ret; }