/[cvs]/eggdrop1.8/src/tclhash.c
ViewVC logotype

Diff of /eggdrop1.8/src/tclhash.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3.2.2 by pseudo, Wed Jan 12 13:54:00 2011 UTC revision 1.3.2.4 by thommey, Fri Jul 8 23:14:17 2011 UTC
# Line 1181  void check_tcl_cron(struct tm *tm) Line 1181  void check_tcl_cron(struct tm *tm)
1181                   MATCH_CRON | BIND_STACKABLE);                   MATCH_CRON | BIND_STACKABLE);
1182  }  }
1183    
1184  int check_tcl_event(const char *event)  void check_tcl_event(const char *event)
1185    {
1186      Tcl_SetVar(interp, "_event1", (char *) event, 0);
1187      check_tcl_bind(H_event, event, 0, " $_event1",
1188                     MATCH_EXACT | BIND_STACKABLE);
1189    }
1190    
1191    int check_tcl_signal(const char *event)
1192  {  {
1193    int x;    int x;
1194    
1195    Tcl_SetVar(interp, "_event1", (char *) event, 0);    Tcl_SetVar(interp, "_event1", (char *) event, 0);
1196    x = check_tcl_bind(H_event, event, 0, " $_event1",    x = check_tcl_bind(H_event, event, 0, " $_event1",
1197                   MATCH_EXACT | BIND_STACKABLE | BIND_WANTRET);                   MATCH_EXACT | BIND_STACKABLE | BIND_STACKRET);
1198    return (x == BIND_EXEC_LOG);    return (x == BIND_EXEC_LOG);
1199  }  }
1200    
# Line 1309  void add_builtins(tcl_bind_list_t *tl, c Line 1316  void add_builtins(tcl_bind_list_t *tl, c
1316    for (i = 0; cc[i].name; i++) {    for (i = 0; cc[i].name; i++) {
1317      egg_snprintf(p, sizeof p, "*%s:%s", tl->name,      egg_snprintf(p, sizeof p, "*%s:%s", tl->name,
1318                   cc[i].funcname ? cc[i].funcname : cc[i].name);                   cc[i].funcname ? cc[i].funcname : cc[i].name);
1319      l = nmalloc(Tcl_ScanElement(p, &k));      l = nmalloc(Tcl_ScanElement(p, &k) + 1);
1320      Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);      Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
1321      table[0].cdata = (void *) cc[i].func;      table[0].cdata = (void *) cc[i].func;
1322      add_cd_tcl_cmds(table);      add_cd_tcl_cmds(table);
# Line 1327  void rem_builtins(tcl_bind_list_t *table Line 1334  void rem_builtins(tcl_bind_list_t *table
1334    for (i = 0; cc[i].name; i++) {    for (i = 0; cc[i].name; i++) {
1335      egg_snprintf(p, sizeof p, "*%s:%s", table->name,      egg_snprintf(p, sizeof p, "*%s:%s", table->name,
1336                   cc[i].funcname ? cc[i].funcname : cc[i].name);                   cc[i].funcname ? cc[i].funcname : cc[i].name);
1337      l = nmalloc(Tcl_ScanElement(p, &k));      l = nmalloc(Tcl_ScanElement(p, &k) + 1);
1338      Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);      Tcl_ConvertElement(p, l, k | TCL_DONT_USE_BRACES);
1339      Tcl_DeleteCommand(interp, p);      Tcl_DeleteCommand(interp, p);
1340      unbind_bind_entry(table, cc[i].flags, cc[i].name, l);      unbind_bind_entry(table, cc[i].flags, cc[i].name, l);

Legend:
Removed from v.1.3.2.2  
changed lines
  Added in v.1.3.2.4

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23