Add explicit function prototypes

This commit is contained in:
Nishi 2026-06-18 14:11:47 +09:00
commit 07645647d9
41 changed files with 163 additions and 104 deletions

14
sj3.c
View file

@ -31,6 +31,8 @@
#include "wchar16.h"
#include <signal.h>
#include <errno.h>
#include <stdlib.h>
#include <unistd.h>
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__bsdi__) || defined(__DragonFly__)
#define USE_OLD_TTY
#if defined(__NetBSD__)
@ -128,9 +130,9 @@ struct jtchars jtc;
int erase_char;
wchar16_t erase_str[2];
#ifdef SIGTYPE_VOID
void (*sigpipe)();
void (*sigpipe)(int);
#else
int (*sigpipe)();
int (*sigpipe)(int);
#endif
int Pid_shell;
@ -192,8 +194,7 @@ void init(char** argv) {
void init_env(void) {
char * uname, *hp, *tname;
int i;
struct passwd *pwd, *getpwnam(), *getpwuid();
char * getlogin(), *getenv();
struct passwd* pwd;
user_name[0] = '\0';
home[0] = '\0';
@ -880,7 +881,6 @@ void getslave(void) {
void execcmd(char* cmd, char** ap) {
int c;
char* getenv();
char *path, *cp, fullcmd[BUFSIZ];
path = getenv("PATH");
@ -980,9 +980,9 @@ void exitprocess(void) {
void suspend(void) {
#ifdef SIGTYPE_VOID
void (*old_sigtstp)();
void (*old_sigtstp)(int);
#else
int (*old_sigtstp)();
int (*old_sigtstp)(int);
#endif
SELECT_FD ifds;
int nc;