#define CMD2_UBITS 0x10
static BITCMD *addcmd (BITCMD *, int, int, int, unsigned int);
-static int compress_mode (BITCMD *);
+static void compress_mode (BITCMD *);
#ifdef SETMODE_DEBUG
static void dumpmode __P((BITCMD *));
#endif
* 'g' and 'o' commands continue to be separate. They could probably be
* compacted, but it's not worth the effort.
*/
-static int
+static void
compress_mode(set)
register BITCMD *set;
{
extern long lseek();
extern char *strncpy();
+void do_file(int fd);
+
process(fd)
int fd;
{
}
}
-do_file(fd)
+void do_file(fd)
int fd;
{
struct outname *nbufp = NULL;
MAN.elle=
MAN.ellec=
+.if !empty(CC:Mclang)
+# tons of int functions don't return values
+CFLAGS+= -Wreturn-type
+.endif
+
defprf.c: deffun.e
cat deffun.e defprf.e | ellec -Pconf > defprf.c
*/
#include "elle.h"
+#include "eeproto.h"
/* Function table, see the included file for explanation. */
/* First must pre-declare function addrs */
+#if 0
#define EFUN(rtn,rtnstr,name) int rtn();
#define EFUNHOLE
#include "eefdef.h"
+#endif
/* Now re-insert to define function table */
-int (*funtab[])() =
+typedef int (*eefunc)();
+eefunc funtab[] =
{
#undef EFUN /* Avoid redefinition error message */
#undef EFUNHOLE
-#define EFUN(rtn,rtnstr,name) rtn,
+#define EFUN(rtn,rtnstr,name) (eefunc) rtn,
#define EFUNHOLE 0,
#include "eefdef.h"
};
/* Asks for a profile file and sets profile from it.
*/
f_setprof()
-{ int set_profile();
- hack_file("Set Profile: ", set_profile);
+{ hack_file("Set Profile: ", set_profile);
}
#if FX_VTBUTTONS
#include <sys/file.h> /* for O_BINARY */
#endif
-set_profile(filename)
+void set_profile(filename)
char *filename;
{ char pfile[200];
register int pfd, len;
/* SET_TTY() - Set up terminal modes for editing */
-set_tty()
+void set_tty()
{ if(trm_mode) return; /* Ignore if detached or in edit mode */
trm_mode++;
ts_enter(); /* Set up system's ideas about terminal */
* as to what has changed or needs updating, to avoid wasting time
* on things which don't need attention.
*/
-redisplay ()
+void redisplay ()
{ register struct window *w;
register i;
struct window *make_mode();
}
#if FX_SOWIND
-fillset(str,cnt,c)
+void fillset(str,cnt,c)
char *str;
int cnt;
int c;
}
#endif
-fillsp(str,cnt)
+void fillsp(str,cnt)
char *str;
int cnt;
{ register int n;
do{ *cp++ = SP;
} while(--n);
}
-inspc(cp0, cpl, cnt)
+
+void inspc(cp0, cpl, cnt)
char *cp0, *cpl;
int cnt;
{ register char *cp, *cp2;
int sctreol = 0; /* Ugly crock for talking to sctrin() */
/* 0 = no EOL seen, 1 = EOL seen, -1 = EOF seen */
-fix_line(slp, olds)
+void fix_line(slp, olds)
struct scr_line *slp;
struct scr_line *olds;
{ register struct scr_line *s;
#endif
-t_move(y,x)
+void t_move(y,x)
register int y,x;
{ register int d;
* through all modified buffers, complaining about a different one each time,
* so that the user need not even know how to select a buffer!
*/
-f_retsup()
+void f_retsup()
{ register char *reply;
register int c;
register struct buffer *b, *b2;
#if FX_WFEXIT
/* EFUN: "Write File Exit" (not EMACS) - from IMAGEN config */
-f_wfexit()
+void f_wfexit()
{
exp_p = 1; /* Ensure f_savefiles asks no questions */
if (! f_savefiles()) /* Save all modified buffers, but */
_PROTOTYPE( int cmd_read, (void) );
_PROTOTYPE( int cmd_xct, (int ch) );
_PROTOTYPE( int cmd_idx, (int c) );
-_PROTOTYPE( int set_profile, (char *filename) );
+_PROTOTYPE( void set_profile, (char *filename) );
_PROTOTYPE( int init_menu, (void) );
/* eediag.c */
_PROTOTYPE( char *db_scflgs, (int flags) );
/* eedisp.c */
-_PROTOTYPE( int set_tty, (void) );
+_PROTOTYPE( void set_tty, (void) );
_PROTOTYPE( int clean_exit, (void) );
_PROTOTYPE( int set_scr, (void) );
-_PROTOTYPE( int redisplay, (void) );
+_PROTOTYPE( void redisplay, (void) );
_PROTOTYPE( int fupd_wind, (struct window *w) );
_PROTOTYPE( int upd_curs, (chroff adot) );
_PROTOTYPE( int d_line, (chroff cdot) );
_PROTOTYPE( int upd_wind, (struct window *win) );
_PROTOTYPE( int slineq, (struct scr_line *olds, struct scr_line *news) );
_PROTOTYPE( int upd_line, (int y) );
-_PROTOTYPE( int fillset, (char *str, int cnt, int c) );
-_PROTOTYPE( int fillsp, (char *str, int cnt) );
-_PROTOTYPE( int inspc, (char *cp0, char *cpl, int cnt) );
-_PROTOTYPE( int fix_line, (struct scr_line *slp, struct scr_line *olds) );
+_PROTOTYPE( void fillset, (char *str, int cnt, int c) );
+_PROTOTYPE( void fillsp, (char *str, int cnt) );
+_PROTOTYPE( void inspc, (char *cp0, char *cpl, int cnt) );
+_PROTOTYPE( void fix_line, (struct scr_line *slp, struct scr_line *olds) );
_PROTOTYPE( int sctrin, (char *to, int lim, int ccol) );
_PROTOTYPE( int inslin, (int line, int n, struct window *win) );
_PROTOTYPE( int dellin, (int line, int n, struct window *win) );
_PROTOTYPE( int t_dostandout, (int on) );
-_PROTOTYPE( int t_move, (int y, int x) );
+_PROTOTYPE( void t_move, (int y, int x) );
_PROTOTYPE( int t_docleol, (void) );
/* eeedit.c */
_PROTOTYPE( int initialize, (void) );
_PROTOTYPE( int f_throw, (void) );
_PROTOTYPE( int ring_bell, (void) );
-_PROTOTYPE( int f_retsup, (void) );
-_PROTOTYPE( int f_wfexit, (void) );
+_PROTOTYPE( void f_retsup, (void) );
+_PROTOTYPE( void f_wfexit, (void) );
_PROTOTYPE( int f_pshinf, (void) );
_PROTOTYPE( char *memalloc, (SBMO size) );
_PROTOTYPE( int chkfree, (SBMA ptr) );
_PROTOTYPE( int srchint, (void) );
_PROTOTYPE( char *srch_ask, (char *prompt) );
_PROTOTYPE( int f_risrch, (void) );
+_PROTOTYPE( int f_isrch, (void) );
_PROTOTYPE( int i_search, (int back) );
/* eeterm.c */
_PROTOTYPE(int strueq , (char *s1 , char *s2 ));
_PROTOTYPE(int do_opcod , (void));
_PROTOTYPE(int do_opasc , (void));
-_PROTOTYPE(int outkbind , (int c , int fx ));
+_PROTOTYPE(void outkbind , (int c , int fx ));
_PROTOTYPE(int do_obprof , (void));
_PROTOTYPE(int mupcase , (int ch ));
_PROTOTYPE(int upcase , (int ch ));
_PROTOTYPE(int compile_stdin , (void));
_PROTOTYPE(int lrch , (void));
_PROTOTYPE(struct lnode *lread , (void));
-_PROTOTYPE(int wspfls , (void));
+_PROTOTYPE(void wspfls , (void));
_PROTOTYPE(struct lnode *lrstr , (int flg ));
_PROTOTYPE(int islword , (int c ));
_PROTOTYPE(struct lnode *eval , (struct lnode *lp ));
fatal("%d errors encountered, check output file.", oerrs);
}
-outkbind(c, fx)
+void outkbind(c, fx)
{
if(fx == 0) /* Allow key to be mapped to nothing. */
return;
return(lrstr(0));
}
-wspfls()
+void wspfls()
{ register int c;
for(;;)
{ c = lrch();
_PROTOTYPE(void getgeom, (void));
_PROTOTYPE(int getboot, (char *buffer));
_PROTOTYPE(int putboot, (char *buffer));
-_PROTOTYPE(int load_from_file, (void));
-_PROTOTYPE(int save_to_file, (void));
+_PROTOTYPE(void load_from_file, (void));
+_PROTOTYPE(void save_to_file, (void));
_PROTOTYPE(int dpl_partitions, (int rawflag));
_PROTOTYPE(int chk_table, (void));
_PROTOTYPE(int sec_to_hst, (long logsec, unsigned char *hd, unsigned char *sec,
unsigned char *cyl));
_PROTOTYPE(int mark_partition, (struct part_entry *pe));
-_PROTOTYPE(int change_partition, (struct part_entry *entry));
+_PROTOTYPE(void change_partition, (struct part_entry *entry));
_PROTOTYPE(int get_a_char, (void));
_PROTOTYPE(int print_menu, (void));
_PROTOTYPE(void adj_base, (struct part_entry *pe));
#endif
-load_from_file()
+void load_from_file()
{
/* Load buffer from file */
}
-save_to_file()
+void save_to_file()
{
/* Save to file */
}
}
-change_partition(entry)
+void change_partition(entry)
struct part_entry *entry;
{
/* Get partition info : first & last cylinder */
type= fl_type(st.st_rdev);
/* The drive should not be mounted. */
- if (load_mtab("mkfs") < 0) return;
+ if (load_mtab("mkfs") < 0) exit(1);
while (get_mtab_entry(special, mounted_on, version, rw_flag) == 0) {
if (stat(special, &st) >= 0 && isfloppy(st.st_rdev)
*p-- = '\0';
getyx(w, r, c);
- if(c == 0) return;
+ if(c == 0) return NULL;
while(c >= 0) {
c--;
ch = mvwinch(w, r, c);