Branch: Tag:

1999-02-19

1999-02-19 04:58:41 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

Parser Parser.HTML begun work

Rev: src/modules/Parser/Makefile.in:1.1
Rev: src/modules/Parser/acconfig.h:1.1
Rev: src/modules/Parser/config.h.in:1.1
Rev: src/modules/Parser/configure.in:1.1
Rev: src/modules/Parser/html.c:1.1
Rev: src/modules/Parser/module.pmod.in:1.1
Rev: src/modules/Parser/parser.c:1.1
Rev: src/modules/Parser/parser.h:1.1
Rev: src/modules/Parser/testsuite.in:1.1

1: + /* +  * $Id: parser.c,v 1.1 1999/02/19 04:58:40 mirar Exp $ +  */    -  + #include "global.h" + #include "config.h" +  + #include "program.h" +  + #include "parser.h" +  + /*** module init & exit & stuff *****************************************/ +  + /* add other parsers here */ +  + static struct parser_class + { +  char *name; +  void (*func)(void); + } sub[] = { +  {"HTML",init_parser_html}, + }; +  + void pike_module_exit(void) + { + } +  + void pike_module_init(void) + { +  int i; +  +  for (i=0; i<(int)(sizeof(sub)/sizeof(sub[0])); i++) +  { +  struct program *p; +  +  start_new_program(); +  fprintf(stderr,"%d %x\n",i,sub[i].func); +  sub[i].func(); +  p=end_program(); +  add_program_constant(sub[i].name,p,0); +  free_program(p); +  } + }   Newline at end of file added.