Skip to content

Commit

Permalink
Remove unspecified () for function pointers.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrincayc committed Jan 24, 2025
1 parent b408d37 commit c420da9
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 16 deletions.
1 change: 0 additions & 1 deletion coms.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ NODE *lshell(NODE *args) {
#endif
return(UNBOUND);
#else
extern FILE *popen();
char cmdbuf[300];
FILE *strm;
NODE *head = NIL, *tail = NIL, *this;
Expand Down
2 changes: 1 addition & 1 deletion eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void reset_args(NODE *old_stack) {
NODE *bf3(NODE *name) {
NODE *string = cnv_node_to_strnode(name);
return make_strnode(getstrptr(string)+3, getstrhead(string),
getstrlen(string)-3, nodetype(string), strcpy);
getstrlen(string)-3, nodetype(string), strnzcpy);
}

NODE *deep_copy(NODE *expresn) {
Expand Down
10 changes: 5 additions & 5 deletions globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extern jmp_buf iblk_buf;

/* logodata.c */
extern char *strnzcpy(char *, char *, int);
extern char *word_strnzcpy(char *, NODE *, int);
extern char *word_strnzcpy(char *, char *, int);
extern char *noparity_strnzcpy(char *, char *, int);
extern char *backslashed_strnzcpy(char *, char *, int);
extern char *mend_strnzcpy(char *, char *, int);
Expand All @@ -62,7 +62,7 @@ extern int low_strncmp(char *, char *, int);
extern int noparity_strncmp(char *, char *, int);
extern int noparitylow_strncmp(char *, char *, int);
extern NODE *make_strnode(char *, struct string_block *, int,
NODETYPES, char *(*)());
NODETYPES, char *(*)(char *, char *, int));
extern void make_runparse(NODE *);
extern NODE *make_quote(NODE *);
extern NODE *maybe_quote(NODE *);
Expand Down Expand Up @@ -177,7 +177,7 @@ extern NODE *lbeforep(NODE *);

/* intern.c */
extern NODE *hash_table[HASH_LEN];
void map_oblist(void (*)());
void map_oblist(void (*)(NODE *));
extern NODE *make_instance(NODE *, NODE *);
extern NODE *intern(NODE *);

Expand Down Expand Up @@ -617,8 +617,8 @@ extern void wxlPrintPict(void);
extern void wxlPrintPreviewPict(void);
extern void wxlPrintText(void);
extern void wxlPrintPreviewText(void);
extern NODE*IncreaseFont(void *);
extern NODE*DecreaseFont(void *);
extern NODE*IncreaseFont(NODE *);
extern NODE*DecreaseFont(NODE *);
extern int turtlePosition_x;
extern int turtlePosition_y;
#define SCREEN_WIDTH 1
Expand Down
2 changes: 1 addition & 1 deletion init.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ typedef struct priminfo {
short defargs;
short maxargs;
short priority;
NODE *(*prim) ();
NODE *(*prim) (NODE *);
} PRIMTYPE;

NODE *Right_Paren, *Left_Paren, *Redefp, *Caseignoredp, *Erract, *Printdepthlimit,
Expand Down
2 changes: 1 addition & 1 deletion intern.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

NODE *hash_table[HASH_LEN] = {NIL};

void map_oblist(void (*fcn)()) {
void map_oblist(void (*fcn)(NODE *)) {
int i;
NODE *nd;

Expand Down
3 changes: 2 additions & 1 deletion logo.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ struct string_block {
#define incstrrefcnt(sh) (((sh)->str_refcnt)++)
#define decstrrefcnt(sh) (--((sh)->str_refcnt))

typedef struct logo_node NODE;
typedef struct logo_node {
NODETYPES node_type;
int my_gen; /* Nodes's Generation */ /*GC*/
Expand All @@ -307,7 +308,7 @@ typedef struct logo_node {
FIXNUM nstring_len;
} nstring;
struct {
struct logo_node * (*nprim_fun) ();
struct logo_node * (*nprim_fun) (NODE *);
short npriority;
short nmin_args;
short ndef_args;
Expand Down
5 changes: 3 additions & 2 deletions logodata.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ char *strnzcpy(char *s1, char *s2, int n) {
return(s1);
}

char *word_strnzcpy(char *s1, NODE *kludge, int n) { /* KLUDGE! */
char *word_strnzcpy(char *s1, char *kludge_char, int n) { /* KLUDGE! */
NODE *kludge = (NODE *)kludge_char;
char *temp = s1;

while (kludge != NIL) {
Expand Down Expand Up @@ -285,7 +286,7 @@ int noparitylow_strncmp(char *s1, char *s2, int n) {
}

NODE *make_strnode(char *strptr, struct string_block *strhead, int len,
NODETYPES typ, char *(*copy_routine)())
NODETYPES typ, char *(*copy_routine)(char *, char *, int))
{
NODE *strnode;

Expand Down
6 changes: 5 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,13 @@ void do_keyact(int ch) {
}
}


#ifdef SIG_TAKES_ARG
void (*intfuns[])(int) = {0, logo_stop, logo_pause, mouse_down,
delayed_keyact};
#else
void (*intfuns[])() = {0, logo_stop, logo_pause, mouse_down,
delayed_keyact};
#endif

void delayed_int() {
#ifdef SIG_TAKES_ARG
Expand Down
6 changes: 3 additions & 3 deletions wrksp.c
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,11 @@ NODE *find_to(NODE *line) {
((c = *(p-1)) == ' ' || c == '\t' || c == '\n'))
return make_strnode(p, getstrhead(line),
getstrlen(line)-(p-lp),
nodetype(line), strcpy);
nodetype(line), strnzcpy);
if (c == '[')
return make_strnode(p, getstrhead(line),
strchr(p, ']')-p,
nodetype(line), strcpy);
nodetype(line), strnzcpy);
}
p++;
}
Expand Down Expand Up @@ -1815,7 +1815,7 @@ NODE *cpdf_newname(NODE *name, NODE*titleline) {
p2 = p1+strcspn(p1, " \t");
sprintf(buf, "%.*s%.*s%s",
(int)(p1-titlestr), titlestr, (int)getstrlen(nname), namestr, p2);
return make_strnode(buf, NULL, strlen(buf), STRING, strcpy);
return make_strnode(buf, NULL, strlen(buf), STRING, strnzcpy);
}

NODE *lcopydef(NODE *args) {
Expand Down

0 comments on commit c420da9

Please sign in to comment.