diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-08-07 06:45:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-08-07 06:45:56 -0700 |
commit | 4a4595707441f0617776629068c0c4598809f6d4 (patch) | |
tree | e04169001a50f326639315ec97bd3e6126dede8e | |
parent | c870cb387621f6f6cf12c312133a18473d5e785f (diff) | |
download | txr-4a4595707441f0617776629068c0c4598809f6d4.tar.gz txr-4a4595707441f0617776629068c0c4598809f6d4.tar.bz2 txr-4a4595707441f0617776629068c0c4598809f6d4.zip |
Change noreturn to NORETURN.
The noreturn macro is respelled to harmonize with the
upper-case INLINE and NOINLINE.
* lib.h (noreturn): Rename to NORETURN.
* arith.c (not_number, not_integer, invalid_ops, invalid_op):
Declaration updated.
* arith.c (do_mp_error): Likewise.
* eval.c (eval_error, no_bindable_error, dotted_form_error):
Likewise.
* eval.h (eval_error): Likewise.
* lib.c (unsup_obj, callerror, wrongargs): Likewise.
* match.c (sem_error): Likewise.
* stream.c (unimpl, unimpl_put_string, unimpl_put_char,
unimpl_put_byte, unimpl_get_line, unimpl_get_char,
unimpl_get_byte, unimpl_unget_char, unimpl_unget_byte,
unimpl_put_buf, unimpl_fill_buf, unimpl_seek, unimpl_truncate,
unimpl_get_sock_family, unimpl_get_sock_type,
unimpl_get_sock_peer, unimpl_set_sock_peer): Likewise.
* struct.c (no_such_struct, no_such_slot,
no_such_static_slot): Likewise.
* unwind.h (jmp_restore, uw_throw, uw_throwf, uw_errorf,
uw_errorfv, type_mismatch): Likewise.
-rw-r--r-- | arith.c | 14 | ||||
-rw-r--r-- | arith.h | 2 | ||||
-rw-r--r-- | eval.c | 6 | ||||
-rw-r--r-- | eval.h | 2 | ||||
-rw-r--r-- | lib.c | 6 | ||||
-rw-r--r-- | lib.h | 4 | ||||
-rw-r--r-- | match.c | 2 | ||||
-rw-r--r-- | stream.c | 34 | ||||
-rw-r--r-- | struct.c | 6 | ||||
-rw-r--r-- | unwind.h | 12 |
10 files changed, 44 insertions, 44 deletions
@@ -124,23 +124,23 @@ val num_from_buffer(mem_t *buf, int bytes) return normalize(n); } -static noreturn void not_number(val self, val obj) +static NORETURN void not_number(val self, val obj) { uw_throwf(type_error_s, lit("~a: ~s is not a number"), self, obj, nao); } -static noreturn void not_integer(val self, val obj) +static NORETURN void not_integer(val self, val obj) { uw_throwf(type_error_s, lit("~a: ~s is not an integer"), self, obj, nao); } -static noreturn void invalid_ops(val self, val obj1, val obj2) +static NORETURN void invalid_ops(val self, val obj1, val obj2) { uw_throwf(type_error_s, lit("~a: invalid operands ~s ~s"), self, obj1, obj2, nao); } -static noreturn void invalid_op(val self, val obj) +static NORETURN void invalid_op(val self, val obj) { uw_throwf(type_error_s, lit("~a: invalid operand ~s"), self, obj, nao); } @@ -478,13 +478,13 @@ void do_mp_error(val self, mp_err code) uw_throwf(numeric_error_s, lit("~a: ~a"), self, errstr, nao); } -static noreturn void not_struct_error(val self, val obj) +static NORETURN void not_struct_error(val self, val obj) { uw_throwf(error_s, lit("~a: ~s isn't a structure"), self, obj, nao); } -static noreturn void method_error(val self, val obj, val fun) +static NORETURN void method_error(val self, val obj, val fun) { uw_throwf(error_s, lit("~a: object ~s lacks ~a method"), self, obj, fun, nao); @@ -1108,7 +1108,7 @@ static val trunc1(val self, val num) invalid_op(self, num); } -static noreturn void divzero(val self) +static NORETURN void divzero(val self) { uw_throwf(numeric_error_s, lit("~a: division by zero"), self, nao); } @@ -60,6 +60,6 @@ val digits(val n, val base); val poly(val x, val seq); val rpoly(val x, val seq); -noreturn void do_mp_error(val self, mp_err code); +NORETURN void do_mp_error(val self, mp_err code); void arith_init(void); void arith_free_all(void); @@ -302,7 +302,7 @@ static void eval_exception(val sym, val ctx, val fmt, va_list vl) uw_rthrow(sym, get_string_from_stream(stream)); } -noreturn val eval_error(val ctx, val fmt, ...) +NORETURN val eval_error(val ctx, val fmt, ...) { va_list vl; va_start (vl, fmt); @@ -968,7 +968,7 @@ static val bind_args(val env, val params, struct args *args, val ctx) return new_env; } -noreturn static val not_bindable_error(val form, val sym) +NORETURN static val not_bindable_error(val form, val sym) { eval_error(form, lit("~s: ~s is not a bindable symbol"), car(form), sym, nao); @@ -3259,7 +3259,7 @@ static val dot_to_apply(val form, val lisp1_p) return form; } -noreturn static void dotted_form_error(val form) +NORETURN static void dotted_form_error(val form) { uw_throwf(error_s, lit("dotted argument ~!~s not supported by form"), form, nao); @@ -40,7 +40,7 @@ extern val dyn_env; #define load_path (deref(lookup_var_l(nil, load_path_s))) -noreturn val eval_error(val ctx, val fmt, ...); +NORETURN val eval_error(val ctx, val fmt, ...); val ctx_form(val obj); val ctx_name(val obj); val lookup_origin(val form); @@ -364,7 +364,7 @@ static val seq_iterable(seq_info_t si) return nil; } -static void noreturn unsup_obj(val self, val obj) +static void NORETURN unsup_obj(val self, val obj) { uw_throwf(error_s, lit("~a: unsupported object ~s"), self, obj, nao); abort(); @@ -7159,7 +7159,7 @@ val fun_variadic(val fun) } } -static noreturn void callerror(val fun, val msg) +static NORETURN void callerror(val fun, val msg) { uses_or2; @@ -7397,7 +7397,7 @@ val generic_funcall(val fun, struct args *args) return do_generic_funcall(fun, args); } -static noreturn void wrongargs(val fun) +static NORETURN void wrongargs(val fun) { callerror(fun, lit("wrong number of arguments")); } @@ -57,10 +57,10 @@ typedef double_uintptr_t dbl_ucnum; #define PTR_BIT (SIZEOF_PTR * CHAR_BIT) #ifdef __GNUC__ -#define noreturn __attribute__((noreturn)) +#define NORETURN __attribute__((noreturn)) #define NOINLINE __attribute__((noinline)) #else -#define noreturn +#define NORETURN #define NOINLINE #endif @@ -85,7 +85,7 @@ static void debuglf(val form, val fmt, ...) } } -noreturn static void sem_error(val form, val fmt, ...) +NORETURN static void sem_error(val form, val fmt, ...) { va_list vl; val stream = make_string_output_stream(); @@ -137,59 +137,59 @@ void stream_mark_op(val stream) strm_base_mark(s); } -static noreturn void unimpl(val stream, val op) +static NORETURN void unimpl(val stream, val op) { uw_throwf(file_error_s, lit("~a: not supported by stream ~s"), op, stream, nao); abort(); } -static noreturn val unimpl_put_string(val stream, val str) +static NORETURN val unimpl_put_string(val stream, val str) { (void) str; unimpl(stream, lit("put-string")); } -static noreturn val unimpl_put_char(val stream, val ch) +static NORETURN val unimpl_put_char(val stream, val ch) { (void) ch; unimpl(stream, lit("put-char")); } -static noreturn val unimpl_put_byte(val stream, int byte) +static NORETURN val unimpl_put_byte(val stream, int byte) { (void) byte; unimpl(stream, lit("put-byte")); } -static noreturn val unimpl_get_line(val stream) +static NORETURN val unimpl_get_line(val stream) { unimpl(stream, lit("get-line")); } -static noreturn val unimpl_get_char(val stream) +static NORETURN val unimpl_get_char(val stream) { unimpl(stream, lit("get-char")); } -static noreturn val unimpl_get_byte(val stream) +static NORETURN val unimpl_get_byte(val stream) { unimpl(stream, lit("get-byte")); } -static noreturn val unimpl_unget_char(val stream, val ch) +static NORETURN val unimpl_unget_char(val stream, val ch) { (void) ch; unimpl(stream, lit("unget-char")); } -static noreturn val unimpl_unget_byte(val stream, int byte) +static NORETURN val unimpl_unget_byte(val stream, int byte) { (void) byte; unimpl(stream, lit("unget-byte")); } -static noreturn ucnum unimpl_put_buf(val stream, mem_t *ptr, ucnum len, ucnum pos) +static NORETURN ucnum unimpl_put_buf(val stream, mem_t *ptr, ucnum len, ucnum pos) { (void) ptr; (void) len; @@ -197,7 +197,7 @@ static noreturn ucnum unimpl_put_buf(val stream, mem_t *ptr, ucnum len, ucnum po unimpl(stream, lit("put-buf")); } -static noreturn ucnum unimpl_fill_buf(val stream, mem_t *ptr, ucnum len, ucnum pos) +static NORETURN ucnum unimpl_fill_buf(val stream, mem_t *ptr, ucnum len, ucnum pos) { (void) ptr; (void) len; @@ -205,35 +205,35 @@ static noreturn ucnum unimpl_fill_buf(val stream, mem_t *ptr, ucnum len, ucnum p unimpl(stream, lit("fill-buf")); } -static noreturn val unimpl_seek(val stream, val off, enum strm_whence whence) +static NORETURN val unimpl_seek(val stream, val off, enum strm_whence whence) { (void) off; (void) whence; unimpl(stream, lit("seek-stream")); } -static noreturn val unimpl_truncate(val stream, val len) +static NORETURN val unimpl_truncate(val stream, val len) { (void) len; unimpl(stream, lit("truncate-stream")); } -static noreturn val unimpl_get_sock_family(val stream) +static NORETURN val unimpl_get_sock_family(val stream) { unimpl(stream, lit("sock-family")); } -static noreturn val unimpl_get_sock_type(val stream) +static NORETURN val unimpl_get_sock_type(val stream) { unimpl(stream, lit("sock-type")); } -static noreturn val unimpl_get_sock_peer(val stream) +static NORETURN val unimpl_get_sock_peer(val stream) { unimpl(stream, lit("sock-peer")); } -static noreturn val unimpl_set_sock_peer(val stream, val peer) +static NORETURN val unimpl_set_sock_peer(val stream, val peer) { (void) peer; unimpl(stream, lit("sock-set-peer")); @@ -216,7 +216,7 @@ void struct_init(void) reg_fun(intern(lit("static-slot-types"), system_package), func_n1(static_slot_types)); } -static noreturn void no_such_struct(val ctx, val sym) +static NORETURN void no_such_struct(val ctx, val sym) { uw_throwf(error_s, lit("~a: ~s does not name a struct type"), ctx, sym, nao); @@ -1126,13 +1126,13 @@ static struct stslot *lookup_static_slot_desc_load(struct struct_type *st, return stsl; } -static noreturn void no_such_slot(val ctx, val type, val slot) +static NORETURN void no_such_slot(val ctx, val type, val slot) { uw_throwf(error_s, lit("~a: ~s has no slot named ~s"), ctx, type, slot, nao); } -static noreturn void no_such_static_slot(val ctx, val type, val slot) +static NORETURN void no_such_static_slot(val ctx, val type, val slot) { uw_throwf(error_s, lit("~a: ~s has no static slot named ~s"), ctx, type, slot, nao); @@ -167,7 +167,7 @@ extern "C" { #endif int jmp_save(struct jmp *); -noreturn void jmp_restore(struct jmp *, int); +NORETURN void jmp_restore(struct jmp *, int); #ifdef __cplusplus } @@ -344,10 +344,10 @@ void uw_push_expand(uw_frame_t *, val form, val env); val uw_rthrow(val sym, val exception); val uw_rthrowv(val sym, struct args *); val uw_rthrowfv(val sym, val fmt, struct args *); -noreturn val uw_throw(val sym, val exception); -noreturn val uw_throwf(val sym, val fmt, ...); -noreturn val uw_errorf(val fmt, ...); -noreturn val uw_errorfv(val fmt, struct args *args); +NORETURN val uw_throw(val sym, val exception); +NORETURN val uw_throwf(val sym, val fmt, ...); +NORETURN val uw_errorf(val fmt, ...); +NORETURN val uw_errorfv(val fmt, struct args *args); val uw_warningf(val fmt, ...); val uw_defer_warning(val args); val uw_warning_exists(val tag); @@ -383,7 +383,7 @@ void uw_push_cont_copy(uw_frame_t *, mem_t *ptr, void uw_init(void); void uw_late_init(void); -noreturn val type_mismatch(val, ...); +NORETURN val type_mismatch(val, ...); #define uw_mark_frame \ uw_frame_t *uw_top = uw_current_frame() |