Commit ab6f3c1
committed
libast & ksh: cleanup: remove unused errorctx() function
In version 93s+ 2007-03-25, AT&T added errorctx(), intending that
it replace the errorpush() and errorpop() macros used in ksh to
push and pop error contexts (this is the mechanism that shows a
call stack of functions/commands in ksh error messages).
Whereas errorpush()/errorpop() only pushes/pops a part of the
Error_info_t struct (the part that is Error_context_t), errorctx()
saves and restores the entire Error_info_t struct. This approach
looks incompatible with existing ksh practice.
After adding errorctx(), AT&T never used it. It just sat there
until they abandoned ksh, never being changed or developed. If any
attempt was made to transition to it, it must not have worked.
Meanwhile, the existing mechanism works well and is time-tested, so
it's time to delete yet another forgotten-about AT&T experiment.
src/cmd/ksh93/Mamfile,
src/lib/libast/include/error.h,
src/lib/libcmd/cmd.h:
- Remove ERROR_CONTEXT_T definition that determined the type of the
error_info.context pointer (Error_context_t* in the old and now
the only mechanism, Error_info_t* in the new experiment).
- Remove ERROR_FREE, ERROR_POP, ERROR_PUSH and (unused) ERROR_SET
definitions for errorctx().
- Transfer ERROR_CALLBACK (originally an alias for ERROR_SET) from
cmd.h to error.h so we have related definitions in one place.
src/lib/libast/misc/error.c:
- context(): Remove use of ERROR_PUSH macro.
- Remove the errorctx() function.1 parent ecaf58b commit ab6f3c1
4 files changed
+8
-66
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
| 1012 | + | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 78 | + | |
| 79 | + | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | 84 | | |
87 | 85 | | |
88 | 86 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 87 | | |
98 | 88 | | |
99 | | - | |
| 89 | + | |
100 | 90 | | |
101 | 91 | | |
102 | 92 | | |
103 | 93 | | |
104 | 94 | | |
105 | 95 | | |
106 | | - | |
| 96 | + | |
107 | 97 | | |
108 | 98 | | |
109 | 99 | | |
| |||
203 | 193 | | |
204 | 194 | | |
205 | 195 | | |
206 | | - | |
207 | 196 | | |
208 | 197 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | 284 | | |
287 | 285 | | |
288 | 286 | | |
289 | 287 | | |
290 | | - | |
| 288 | + | |
291 | 289 | | |
292 | 290 | | |
293 | 291 | | |
| |||
432 | 430 | | |
433 | 431 | | |
434 | 432 | | |
435 | | - | |
| 433 | + | |
436 | 434 | | |
437 | 435 | | |
438 | 436 | | |
| |||
593 | 591 | | |
594 | 592 | | |
595 | 593 | | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
612 | | - | |
613 | | - | |
614 | | - | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
633 | | - | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | 34 | | |
37 | 35 | | |
38 | 36 | | |
| |||
0 commit comments