Skip to content

Commit

Permalink
Update remaining K&R function declarations to modern style (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
ur4t authored and burgerrg committed Apr 27, 2023
1 parent 9df56e7 commit b866fd3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 10 deletions.
3 changes: 1 addition & 2 deletions c/fasl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1553,8 +1553,7 @@ static uptr sparc64_get_literal(void *address) {
return item;
}

static U32 adjust_delay_inst(delay_inst, old_call_addr, new_call_addr)
U32 delay_inst; U32 *old_call_addr, *new_call_addr; {
static U32 adjust_delay_inst(U32 delay_inst, U32 *old_call_addr, U32 *new_call_addr) {
INT offset;

offset = sizeof(U32) * (old_call_addr - new_call_addr);
Expand Down
2 changes: 1 addition & 1 deletion c/foreign.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ void S_foreign_entry(void) {
AC0(tc) = x;
}

static void *lookup_foreign_entry(s) const char *s; {
static void *lookup_foreign_entry(const char *s) {
return ptr_to_addr(lookup(s));
}

Expand Down
3 changes: 1 addition & 2 deletions c/number.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,7 @@ static void big_short_trunc(ptr tc, ptr x, bigit s, iptr xl, IBOOL qs, IBOOL rs,
if (r != (ptr *)NULL) *r = copy_normalize(tc, &k,1,rs);
}

static void big_trunc(tc, x, y, xl, yl, qs, rs, q, r)
ptr tc, x, y; iptr xl, yl; IBOOL qs, rs; ptr *q, *r; {
static void big_trunc(ptr tc, ptr x, ptr y, iptr xl, iptr yl, IBOOL qs, IBOOL rs, ptr *q, ptr *r) {
iptr i;
bigit *p, *xp, *yp;
iptr m = xl-yl+1;
Expand Down
3 changes: 1 addition & 2 deletions c/prim5.c
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,7 @@ static ptr s_flush_instruction_cache(void) {
return Svoid;
}

static ptr s_make_code(flags, free, name, arity_mark, n, info, pinfos)
iptr flags, free, n; ptr name, arity_mark, info, pinfos; {
static ptr s_make_code(iptr flags, iptr free, ptr name, ptr arity_mark, iptr n, ptr info, ptr pinfos) {
ptr co;

tc_mutex_acquire()
Expand Down
2 changes: 1 addition & 1 deletion c/scheme.c
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ static IBOOL next_path(char *path, const char *name, const char *ext, const char
static const char *path_last(const char *path);
static char *get_defaultheapdirs(void);

static const char *path_last(p) const char *p; {
static const char *path_last(const char *p) {
const char *s;
#ifdef WIN32
char c;
Expand Down
2 changes: 1 addition & 1 deletion c/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ iptr S_find_segments(ISPC s, IGEN g, iptr n) {
* allocates a group of n contiguous fresh segments, returning the
* segment number of the first segment of the group.
*/
static seginfo *allocate_segments(nreq) uptr nreq; {
static seginfo *allocate_segments(uptr nreq) {
uptr nact, bytes, base; void *addr;
iptr i;
chunkinfo *chunk; seginfo *si;
Expand Down
2 changes: 1 addition & 1 deletion c/thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ ptr S_fork_thread(ptr thunk) {
return thread;
}

static s_thread_rv_t start_thread(p) void *p; {
static s_thread_rv_t start_thread(void *p) {
ptr tc = (ptr)p; ptr cp;

s_thread_setspecific(S_tc_key, tc);
Expand Down

0 comments on commit b866fd3

Please sign in to comment.