Searched refs:trap (Results 1 - 25 of 27) sorted by relevance

12

/ast/src/cmd/nmake/
H A Dtrap.c32 #undef trap macro
85 } trap; variable in typeref:struct:Trap_s
95 trap.caught[sig] = 1;
109 for (a = trap.alarms; a; a = a->next)
125 if (!trap.alarms)
127 else if (trap.alarms->time <= now)
130 t = trap.alarms->time - now;
138 if (a = trap.alarms)
165 alarms = trap.alarms;
178 for (z = 0, a = trap
[all...]
H A Dparse.c560 trap();
612 trap();
3316 if (trap() && !op)
H A Dmake.h111 #define trap() (state.caught?handle():0) macro
846 char* hold; /* hold error trap */
H A Dcommand.c1164 if (trap())
/ast/src/cmd/3d/
H A Dftruncate3d.c51 for (m = state.trap.size - 1; m >= 0; m--)
52 if (MSG_MASK(MSG_truncate) & state.trap.intercept[m].mask)
56 n = state.trap.size;
57 state.trap.size = m;
58 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_truncate, SYS3D_ftruncate64, (void*)fd, (void*)&size, NiL, NiL, NiL, NiL);
59 state.trap.size = n;
H A Dtruncate3d.c54 for (m = state.trap.size - 1; m >= 0; m--)
55 if (MSG_MASK(MSG_truncate) & state.trap.intercept[m].mask)
59 n = state.trap.size;
60 state.trap.size = m;
61 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_truncate, SYS3D_truncate64, (void*)sp, (void*)&size, NiL, NiL, NiL, NiL);
62 state.trap.size = n;
H A Dlseek3d.c69 for (m = state.trap.size - 1; m >= 0; m--)
70 if (MSG_MASK(MSG_seek) & state.trap.intercept[m].mask)
74 n = state.trap.size;
75 state.trap.size = m;
76 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], MSG_seek, SYS3D_lseek64, (void*)fd, (void*)&off, (void*)op, NiL, NiL, NiL) ? -1 : off;
77 state.trap.size = n;
H A Dsyscall3d.c256 for (m = state.trap.size - 1; m >= 0; m--)
257 if (MSG_MASK(cp->call) & state.trap.intercept[m].mask)
258 bprintf(b, e, " %p[%d]", state.trap.intercept[m].call, m);
453 for (m = state.trap.size - 1; m >= 0; m--)
454 if (MSG_MASK(cp->call) & state.trap.intercept[m].mask)
458 n = state.trap.size;
459 state.trap.size = m;
460 r = (*state.trap.intercept[m].call)(&state.trap.intercept[m], cp->call, call, arg[1].pointer, arg[2].pointer, arg[3].pointer, arg[4].pointer, arg[5].pointer, arg[6].pointer);
461 state.trap
[all...]
H A Dinit.c1500 if (i >= state.trap.size)
1502 if (i >= elementsof(state.trap.intercept))
1504 state.trap.size++;
1507 else if (state.trap.intercept[i].call == call)
1509 state.trap.intercept[i].call = call;
1510 state.trap.intercept[i].mask = mask;
H A D3d.h520 } trap; member in struct:__anon7
/ast/src/cmd/ksh93/sh/
H A Dfault.c67 register char *trap; local
87 trap = shp->st.trapcom[sig];
97 if(trap && *trap)
104 if(shp->subshell && trap && sig!=SIGINT && sig!=SIGQUIT && sig!=SIGWINCH && sig!=SIGCONT)
112 if(trap && *trap==0)
115 if(!trap)
173 if(trap)
274 * Turn on trap handle
324 register char *trap; local
369 register char *trap; local
390 register char *trap; local
446 sh_trap(const char *trap, int mode) argument
[all...]
H A Dsubshell.c185 char *trap = shp->st.trapcom[0]; local
186 if(trap)
187 trap = strdup(trap);
199 if(trap)
200 free((void*)trap);
216 shp->st.trapcom[0] = trap;
571 /* save trap table */
573 shp->st.otrap = savst.trap;
578 /* this nonsense needed for $(trap) */
631 char *trap=shp->st.trapcom[0]; local
[all...]
H A Dxec.c498 int sh_debug(Shell_t *shp, const char *trap, const char *name, const char *subscript, char *const argv[], int flags) argument
549 shp->st.trap[SH_DEBUGTRAP] = 0;
550 n = sh_trap(trap,0);
812 char *str,*trap,host[PATH_MAX]; local
823 if((trap=shp->st.trapcom[sig]) && *trap==0)
824 sfprintf(sfstdout,"trap '' %d\n",sig);
1021 char *trap; local
1248 if(trap=shp->st.trap[SH_DEBUGTRA
2240 char *cp, *trap, *nullptr = 0; local
2479 register char *trap; local
2524 char *trap, *r = sh_macpat(shp,tt->sw.swarg,OPTIMIZE); local
2841 register char *trap; local
3321 register char *trap; local
3732 register char *trap; local
[all...]
H A Dname.c299 char *trap=shp->st.trap[SH_DEBUGTRAP]; local
466 if(traceon || trap)
472 if(trap)
473 sh_debug(shp,trap,name,(char*)0,argv,(arg->argflag&ARG_APPEND)|ARG_ASSIGN);
629 if(traceon || trap)
656 if(trap)
661 sh_debug(shp,trap,name,sub,av,append);
H A Djobs.c198 void job_chldtrap(Shell_t *shp, const char *trap, int unpost) argument
219 sh_trap(trap,0);
H A Dio.c1144 char *tname=0, *after="", *trace = shp->st.trap[SH_DEBUGTRAP];
/ast/src/cmd/ksh93/bltins/
H A Dtrap.c22 * trap [-p] action sig...
39 static const char trapfmt[] = "trap -- %s %s\n";
105 char **trap = (shp->st.otrap?shp->st.otrap:shp->st.trap); local
114 if(arg=trap[sig])
119 if(shp->st.trap[sig])
120 free(shp->st.trap[sig]);
121 shp->st.trap[sig] = 0;
123 shp->st.trap[sig] = strdup(action);
126 if(shp->st.trap[si
397 register char *trap,**trapcom; local
[all...]
/ast/src/cmd/html/
H A Dtroff2html.h121 char name[1]; /* trap name */
206 int t; /* distance to next trap */
266 char trap[MAXNAME+4];/* inline trap invocation */ member in struct:State_s::__anon100
284 Trap_t* fini; /* fini trap list */
285 Trap_t* trap; /* normal trap list */ member in struct:State_s
H A Dtroff2html.c1260 * add trap s to xp
1264 trap(Trap_t** xp, char* s) function
1273 error(ERROR_SYSTEM|3, "out of space [trap]");
2606 for (xp = state.trap; xp; xp = xp->next)
2750 trap(&state.fini, ap->argv[i]);
2969 t = state.it.trap;
2976 while (t < &state.it.trap[sizeof(state.it.trap)-2] && (*t = *++s))
3387 xp = (i < 0) ? &state.fini : &state.trap;
3389 trap(x
[all...]
/ast/src/cmd/re/
H A Ded.c101 #define trap() do{if(ed.caught)handle();}while(0) macro
240 trap();
252 trap();
289 trap();
698 trap();
990 trap();
1000 trap();
1500 trap();
/ast/src/cmd/ksh93/data/
H A Dbuiltins.c90 "trap", NV_BLTIN|BLT_ENV|BLT_SPC, bltin(trap),
632 "\bEXIT\b trap is set it will be invoked.]"
639 "exit status of preceding command. When invoked inside a trap, the "
640 "preceding command means the command that invoked the trap.]"
1353 "reserved word syntax, then any \bEXIT\b trap set within the "
1551 "[-1c?\n@(#)$Id: trap (AT&T Research) 1999-07-17 $\n]"
1553 "[+NAME?trap - trap signals and conditions]"
1556 "\btrap\b can be used to display the current trap setting
[all...]
/ast/src/cmd/ksh93/include/
H A Ddefs.h92 char *trap[SH_DEBUGTRAP+1]; member in struct:sh_scoped
199 char indebug; /* set when in debug trap */ \
/ast/src/cmd/coshell/
H A Dshell.c95 sfprintf(vp, "%s -c 'trap \"\" HUP; %s=%s %s=%s %s= COINIT='\\''%s%s'\\'' %s /dev/fd/4 >/dev/null 2>&1 3<%s 4<&3 5>&- 6>&- 7>&- 8>&- 9>&- &'", sh, CO_ENV_HOST, sp->name, CO_ENV_TYPE, sp->type, CO_ENV_SHELL, (sp->flags & SETRATING) ? "rating=0;" : "", state.profile ? state.profile : "", sh, state.mesg);
316 sfprintf(state.string, "{\ntrap 'set %s$?; trap \"\" 0; print -u3 x %d $1 $(times); 3>&-; exit $1' 0 HUP INT QUIT TERM%s\n",
/ast/src/cmd/ksh93/edit/
H A Dedit.c1056 if(mode<=0 && ep->sh->st.trap[SH_KEYTRAP])
1561 * Execute keyboard trap on given buffer <inbuff> of given size <isize>
1589 sh_trap(shp->st.trap[SH_KEYTRAP],0);
H A Dvi.c229 int viraw = (sh_isoption(SH_VIRAW) || ed->sh->st.trap[SH_KEYTRAP]);

Completed in 124 milliseconds

12