mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-19 01:17:36 +00:00
Replace all K&R style function definitions with new-style function definitions.
Add some missing default function result types (int). Add some missing void result types where appropriate. modified: src/Cldeetr.c modified: src/atom.c modified: src/bbtsub.c modified: src/bitblt.c modified: src/byteswap.c modified: src/chardev.c modified: src/chatter.c modified: src/colorbltfns.c modified: src/common.c modified: src/dir.c modified: src/dlpi.c modified: src/doskbd.c modified: src/dosmouse.c modified: src/draw.c modified: src/dsk.c modified: src/dspsubrs.c modified: src/ejlisp.c modified: src/ether.c modified: src/imagefile.c modified: src/imagefile2.c modified: src/inet.c modified: src/initdsp.c modified: src/initkbd.c modified: src/kbdsubrs.c modified: src/ldeboot.c modified: src/llcolor.c modified: src/llstk.c modified: src/loader.c modified: src/loopsops.c modified: src/lpdual.c modified: src/lpmain.c modified: src/lpread.c modified: src/lptran.c modified: src/lpwrite.c modified: src/main.c modified: src/misc7.c modified: src/mkatom.c modified: src/mnwevent.c modified: src/mnxmeth.c modified: src/mouseif.c modified: src/ocr.c modified: src/ocrproc.c modified: src/oether.c modified: src/oldeether.c modified: src/osmsg.c modified: src/picture.c modified: src/rawcolor.c modified: src/rawrs232c.c modified: src/rpc.c modified: src/rs232c.c modified: src/socdvr.c modified: src/socket.c modified: src/testdsp.c modified: src/testtool.c modified: src/timeoday.c modified: src/timeofday.c modified: src/timer.c modified: src/truecolor.c modified: src/tty.c modified: src/ufn.c modified: src/ufs.c modified: src/unixcomm.c modified: src/unixfork.c modified: src/unwind.c modified: src/uraid.c modified: src/vesainit.c modified: src/vgainit.c modified: src/vmemsave.c modified: src/xcursor.c modified: src/xinit.c modified: src/xlspwin.c modified: src/xmkicon.c modified: src/xrdopt.c modified: src/xwinman.c
This commit is contained in:
parent
b578b38c78
commit
5481a14812
@ -51,8 +51,7 @@ int ether_fd = -1; /* file descriptor for ether s
|
||||
unsigned char ether_host[6] = {0, 0, 0, 0, 0, 0}; /* 48 bit address */
|
||||
char filetorun[30] = "ldecolor";
|
||||
|
||||
main(argc, argv, envp) int argc;
|
||||
char **argv, **envp;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char Earg[30], Ename[30], **newargv;
|
||||
int i;
|
||||
|
||||
@ -34,8 +34,7 @@ static char *id = "$Id: atom.c,v 1.3 1999/05/31 23:35:23 sybalsky Exp $ Copyrigh
|
||||
#include "emlglob.h"
|
||||
|
||||
#ifndef BIGATOMS
|
||||
N_OP_atomcellN(tos, n) register int tos;
|
||||
int n;
|
||||
N_OP_atomcellN(int tos, int n)
|
||||
{
|
||||
if ((tos & 0xffff0000) != 0) ERROR_EXIT(tos);
|
||||
|
||||
|
||||
18
src/bbtsub.c
18
src/bbtsub.c
@ -1817,9 +1817,7 @@ typedef struct {
|
||||
|
||||
/** changecharset_display,sfffixy are not tested *****I don't use TAKE **/
|
||||
|
||||
LispPTR sfffixy(displaydata68k, csinfo68k, pbt68k) DISPLAYDATA *displaydata68k;
|
||||
CHARSETINFO *csinfo68k;
|
||||
PILOTBBT *pbt68k;
|
||||
LispPTR sfffixy(DISPLAYDATA *displaydata68k, CHARSETINFO *csinfo68k, PILOTBBT *pbt68k)
|
||||
|
||||
{
|
||||
int y;
|
||||
@ -2028,7 +2026,7 @@ typedef struct tbta {
|
||||
/***************************/
|
||||
/* Non-PIXRECT version */
|
||||
/***************************/
|
||||
void tedit_bltchar(args) register TBLTARG *args;
|
||||
void tedit_bltchar(register TBLTARG *args)
|
||||
{
|
||||
#define backwardflg 0
|
||||
#define displayflg 0
|
||||
@ -2086,7 +2084,7 @@ void tedit_bltchar(args) register TBLTARG *args;
|
||||
/* PIXRECT version */
|
||||
/**********************/
|
||||
|
||||
void tedit_bltchar(args) register TBLTARG *args;
|
||||
void tedit_bltchar(register TBLTARG *args)
|
||||
{
|
||||
register DISPLAYDATA *displaydata68k;
|
||||
register int left, right;
|
||||
@ -2155,9 +2153,8 @@ void tedit_bltchar(args) register TBLTARG *args;
|
||||
#endif
|
||||
|
||||
#ifndef COLOR
|
||||
int old_cursorin(addrhi, addrlo, x, w, h, y, backward) DLword addrhi; /* Lisp addr hi-word */
|
||||
DLword addrlo; /* Lisp addr lo-word */
|
||||
register int x, w, h, y;
|
||||
/* Lisp addr hi-word, lo-word, ... */
|
||||
int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward)
|
||||
{
|
||||
#ifdef INIT
|
||||
init_kbd_startup;
|
||||
@ -2179,9 +2176,8 @@ register int x, w, h, y;
|
||||
|
||||
#else
|
||||
/* For MONO and COLOR */
|
||||
old_cursorin(addrhi, addrlo, x, w, h, y, backward) DLword addrhi; /* Lisp addr hi-word */
|
||||
DLword addrlo; /* Lisp addr lo-word */
|
||||
register int x, w, h, y;
|
||||
/* Lisp addr hi-word, lo-word, ... */
|
||||
int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward)
|
||||
{
|
||||
register DLword *base68k;
|
||||
extern int MonoOrColor;
|
||||
|
||||
11
src/bitblt.c
11
src/bitblt.c
@ -70,8 +70,7 @@ extern int MonoOrColor;
|
||||
/** **/
|
||||
/*****************************************************************************/
|
||||
|
||||
LispPTR N_OP_pilotbitblt(pilot_bt_tbl, tos) LispPTR pilot_bt_tbl;
|
||||
int tos;
|
||||
LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
|
||||
{
|
||||
PILOTBBT *pbt;
|
||||
DLword *srcbase, *dstbase;
|
||||
@ -174,9 +173,7 @@ int tos;
|
||||
|
||||
#ifndef COLOR
|
||||
/* for MONO only */
|
||||
int cursorin(addrhi, addrlo, w, h, backward) DLword addrhi; /* Lisp addr hi-word */
|
||||
DLword addrlo; /* Lisp addr lo-word */
|
||||
register int w, h;
|
||||
int cursorin(DLword addrhi, DLword addrlo, int w, int h, int backward)
|
||||
{
|
||||
register int x, y;
|
||||
if (addrhi == DISPLAY_HI) {
|
||||
@ -198,9 +195,7 @@ register int w, h;
|
||||
#else
|
||||
|
||||
/* for COLOR & MONO */
|
||||
int cursorin(addrhi, addrlo, w, h, backward) DLword addrhi; /* Lisp addr hi-word */
|
||||
DLword addrlo; /* Lisp addr lo-word */
|
||||
register int w, h;
|
||||
int cursorin(DLword addrhi, DLword addrlo, int w, int h, int backward)
|
||||
{
|
||||
register int x, y;
|
||||
register DLword *base68k;
|
||||
|
||||
@ -37,9 +37,7 @@ static char *id = "$Id: byteswap.c,v 1.5 2002/01/02 08:15:16 sybalsky Exp $ Copy
|
||||
|
||||
/****************************************************************/
|
||||
/* */
|
||||
/* Byte-swap a single 2-byte word */
|
||||
/* (Name used for general-purpose byte swaps, rather */
|
||||
/* than for fixing up byte-swapped machines) */
|
||||
/* swap halves of a single 4-byte word */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
unsigned int swapx(unsigned int word) {
|
||||
@ -51,7 +49,7 @@ unsigned int swapx(unsigned int word) {
|
||||
/* Byte-swap a single 2-byte word */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
unsigned short byte_swap_word(short unsigned int word) {
|
||||
unsigned short byte_swap_word(unsigned short word) {
|
||||
return (((word >> 8) & 0xff) + ((word & 0xff) << 8));
|
||||
}
|
||||
|
||||
@ -78,7 +76,7 @@ unsigned int word_swap_longword(word)
|
||||
/* This does NOT swap words in a long-word! */
|
||||
/* */
|
||||
/****************************************************************/
|
||||
void byte_swap_page(short unsigned int *page, int wordcount) {
|
||||
void byte_swap_page(unsigned short *page, int wordcount) {
|
||||
int i;
|
||||
for (i = 0; i < wordcount; i++) { *(page + i) = byte_swap_word(*(page + i)); }
|
||||
}
|
||||
|
||||
@ -83,7 +83,7 @@ extern int Dummy_errno;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_openfile(args) register LispPTR *args;
|
||||
LispPTR CHAR_openfile(LispPTR *args)
|
||||
/* args[0] fullname */
|
||||
/* args[1] access */
|
||||
/* args[2] errno */
|
||||
@ -155,7 +155,7 @@ LispPTR CHAR_openfile(args) register LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_closefile(args) register LispPTR *args;
|
||||
LispPTR CHAR_closefile(LispPTR *args)
|
||||
/* args[0] id */
|
||||
/* args[1] errno */
|
||||
{
|
||||
@ -202,7 +202,7 @@ LispPTR CHAR_closefile(args) register LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_ioctl(args) LispPTR *args;
|
||||
LispPTR CHAR_ioctl(LispPTR *args)
|
||||
{
|
||||
#ifndef DOS
|
||||
int id, request, data;
|
||||
@ -235,8 +235,7 @@ LispPTR CHAR_ioctl(args) LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_bin(id, errn) register int id;
|
||||
register LispPTR errn;
|
||||
LispPTR CHAR_bin(int id, LispPTR errn)
|
||||
{
|
||||
#ifndef DOS
|
||||
register int rval, size;
|
||||
@ -268,8 +267,7 @@ register LispPTR errn;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_bout(id, ch, errn) register int id;
|
||||
register LispPTR ch, errn;
|
||||
LispPTR CHAR_bout(int id, LispPTR ch, LispPTR errn)
|
||||
{
|
||||
#ifndef DOS
|
||||
register int rval;
|
||||
@ -315,7 +313,7 @@ register LispPTR ch, errn;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_bins(args) register LispPTR *args;
|
||||
LispPTR CHAR_bins(LispPTR *args)
|
||||
{
|
||||
#ifndef DOS
|
||||
register int id, rval;
|
||||
@ -366,7 +364,7 @@ LispPTR CHAR_bins(args) register LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR CHAR_bouts(args) register LispPTR *args;
|
||||
LispPTR CHAR_bouts(LispPTR *args)
|
||||
{
|
||||
#ifndef DOS
|
||||
register int id, rval;
|
||||
|
||||
@ -100,7 +100,7 @@ int chatter_fd;
|
||||
*base = C; \
|
||||
}
|
||||
|
||||
chatter(args) int args[];
|
||||
chatter(LispPTR *args)
|
||||
{
|
||||
int result;
|
||||
int length;
|
||||
@ -147,7 +147,7 @@ chatter(args) int args[];
|
||||
return (NIL);
|
||||
}
|
||||
|
||||
chatter_open(dev) char dev[];
|
||||
chatter_open(char *dev)
|
||||
{
|
||||
struct termios termdata;
|
||||
|
||||
@ -191,8 +191,7 @@ chatter_close() {
|
||||
return (0);
|
||||
}
|
||||
|
||||
chatter_write_string(data, len) char data[];
|
||||
int len;
|
||||
chatter_write_string(char *data, int len)
|
||||
{
|
||||
if (write(chatter_fd, data, len) < 0) {
|
||||
perror("WRITE ERROR");
|
||||
@ -201,7 +200,7 @@ int len;
|
||||
return (0);
|
||||
}
|
||||
|
||||
chatter_write_code(code) unsigned char code;
|
||||
chatter_write_code(unsigned char code)
|
||||
{
|
||||
if (write(chatter_fd, &code, 1) < 0) {
|
||||
perror("WRITE ERROR");
|
||||
@ -210,8 +209,7 @@ chatter_write_code(code) unsigned char code;
|
||||
return (0);
|
||||
}
|
||||
|
||||
chatter_read(data, len) unsigned char *data;
|
||||
int len;
|
||||
chatter_read(unsigned char *data, int len)
|
||||
{
|
||||
if (read(chatter_fd, data, len) < 0) {
|
||||
perror("READ ERROR");
|
||||
|
||||
@ -128,7 +128,7 @@ LispPTR COLORSCREEN_index; /* if it's 0xffffffff, not yet initialized */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
C_slowbltchar(args) register LispPTR *args;
|
||||
C_slowbltchar(LispPTR *args)
|
||||
{
|
||||
Stream *n_dstream;
|
||||
DISPLAYDATA *n_dd;
|
||||
@ -300,15 +300,8 @@ C_slowbltchar(args) register LispPTR *args;
|
||||
|
||||
u_int ColorizedFont8CACHE[MAXFONTHEIGHT / BITSPERNIBBLE * MAXFONTWIDTH / BITSPERNIBBLE];
|
||||
|
||||
ColorizeFont8(sBM, sXOffset, sYOffset, dBM, dXOffset, dYOffset, width, height, col0, col1,
|
||||
sourcetype, operation) register BITMAP *sBM;
|
||||
register DLword sXOffset, sYOffset, width, height;
|
||||
register BITMAP *dBM;
|
||||
DLword dYOffset, dXOffset;
|
||||
u_char col0, col1;
|
||||
LispPTR sourcetype;
|
||||
LispPTR operation;
|
||||
|
||||
ColorizeFont8(BITMAP *sBM, DLword sXOffset, DLword sYOffset, BITMAP *dBM, DLword dXOffset, DLword dYOffset, DLword width, DLword height, u_char col0, u_char col1,
|
||||
LispPTR sourcetype, LispPTR operation)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -337,15 +330,8 @@ LispPTR operation;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ColorizeFont8_BIGBM(sBM, sXOffset, sYOffset, dBM, dXOffset, dYOffset, width, height, col0, col1,
|
||||
sourcetype, operation) register BITMAP *sBM;
|
||||
register DLword sXOffset, sYOffset, width, height;
|
||||
register BIGBM *dBM;
|
||||
DLword dXOffset, dYOffset;
|
||||
u_char col0, col1;
|
||||
LispPTR sourcetype;
|
||||
LispPTR operation;
|
||||
|
||||
ColorizeFont8_BIGBM(BITMAP *sBM, DLword sXOffset, DLword sYOffset, BIGBM *dBM, DLword dXOffset, DLword dYOffset, DLword width, DLword height, u_char col0, u_char col1,
|
||||
LispPTR sourcetype, LispPTR operation)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -421,9 +407,7 @@ loop:
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
newColorizeFont8(pbt, backcolor, forecolor, srctype, ope) PILOTBBT *pbt;
|
||||
u_char backcolor, forecolor;
|
||||
LispPTR srctype, ope;
|
||||
newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -446,7 +430,7 @@ LispPTR srctype, ope;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Uncolorize_Bitmap(args) LispPTR args[];
|
||||
Uncolorize_Bitmap(LispPTR args[])
|
||||
{
|
||||
BITMAP *s_bitmap, *d_bitmap;
|
||||
register DLword *OnOff;
|
||||
@ -524,7 +508,7 @@ Uncolorize_Bitmap(args) LispPTR args[];
|
||||
|
||||
extern DLword INPUT_atom, REPLACE_atom;
|
||||
|
||||
Colorize_Bitmap(args) LispPTR args[];
|
||||
Colorize_Bitmap(LispPTR args[])
|
||||
{
|
||||
BITMAP *s_bitmap, *d_bitmap;
|
||||
int s_left, s_bottom, d_left, d_bottom, width, height, color0, color1, d_nbits;
|
||||
@ -601,7 +585,7 @@ bad_arg:
|
||||
} \
|
||||
}
|
||||
|
||||
Draw_8BppColorLine(args) register LispPTR *args;
|
||||
Draw_8BppColorLine(LispPTR *args)
|
||||
{
|
||||
extern DLword REPLACE_atom, INVERT_atom, PAINT_atom, ERASE_atom;
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ uraidloop:
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void warn(s) char *s;
|
||||
void warn(char *s)
|
||||
{ printf("\nWARN: %s \n", s); }
|
||||
|
||||
/*****************************************************************
|
||||
|
||||
74
src/dir.c
74
src/dir.c
@ -191,8 +191,7 @@ extern int Dummy_errno;
|
||||
* number of characters.
|
||||
*/
|
||||
|
||||
int match_pattern(tp, pp) register char *tp;
|
||||
register char *pp;
|
||||
int match_pattern(char *tp, char *pp)
|
||||
{
|
||||
register char *tsp, *psp;
|
||||
register int inastr;
|
||||
@ -244,7 +243,7 @@ register char *pp;
|
||||
|
||||
#ifdef DOS
|
||||
|
||||
int make_old_version(old, file) char *old, *file;
|
||||
int make_old_version(char *old, char *file)
|
||||
{
|
||||
int len = (int)strlen(file) - 1;
|
||||
if (file[len] == DIRCHAR) return 0;
|
||||
@ -366,7 +365,7 @@ unsigned MAXFINFO;
|
||||
*/
|
||||
|
||||
#ifdef FSDEBUG
|
||||
void print_finfo(fp) FINFO *fp;
|
||||
void print_finfo(FINFO *fp)
|
||||
{
|
||||
FINFO *sp;
|
||||
sp = fp;
|
||||
@ -493,10 +492,7 @@ int get_finfo_id() {
|
||||
*/
|
||||
|
||||
#ifdef DOS
|
||||
int enum_dsk_prop(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_dsk_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -656,10 +652,7 @@ FINFO **finfo_buf;
|
||||
return (n);
|
||||
}
|
||||
#else /* DOS */
|
||||
int enum_dsk_prop(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_dsk_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -778,10 +771,7 @@ FINFO **finfo_buf;
|
||||
* Similar to enum_dsk_prop, but file properties are not stored.
|
||||
*/
|
||||
#ifdef DOS
|
||||
int enum_dsk(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_dsk(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -925,10 +915,7 @@ FINFO **finfo_buf;
|
||||
|
||||
#else /* DOS */
|
||||
|
||||
int enum_dsk(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_dsk(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -1036,10 +1023,7 @@ FINFO **finfo_buf;
|
||||
* of FINFO structures.
|
||||
*/
|
||||
#ifdef DOS
|
||||
int enum_ufs_prop(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_ufs_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -1125,10 +1109,7 @@ FINFO **finfo_buf;
|
||||
return (n);
|
||||
}
|
||||
#else /* DOS */
|
||||
int enum_ufs_prop(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_ufs_prop(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -1241,10 +1222,7 @@ FINFO **finfo_buf;
|
||||
* Similar to enum_ufs_prop, but file properties are not stored.
|
||||
*/
|
||||
#ifdef DOS
|
||||
int enum_ufs(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_ufs(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -1314,10 +1292,7 @@ FINFO **finfo_buf;
|
||||
return (n);
|
||||
}
|
||||
#else /* DOS */
|
||||
int enum_ufs(dir, name, ver, finfo_buf) char *dir;
|
||||
char *name;
|
||||
char *ver;
|
||||
FINFO **finfo_buf;
|
||||
int enum_ufs(char *dir, char *name, char *ver, FINFO **finfo_buf)
|
||||
{
|
||||
register struct direct *dp;
|
||||
register FINFO *prevp;
|
||||
@ -1412,7 +1387,7 @@ FINFO **finfo_buf;
|
||||
* This routine is only used by DSK codes.
|
||||
*/
|
||||
|
||||
int trim_finfo(fp) FINFO **fp;
|
||||
int trim_finfo(FINFO **fp)
|
||||
{
|
||||
#ifndef DOS
|
||||
register FINFO *tp, *sp, *mp, *cp, *pp;
|
||||
@ -1541,8 +1516,7 @@ int trim_finfo(fp) FINFO **fp;
|
||||
* of.
|
||||
*/
|
||||
|
||||
int trim_finfo_highest(fp, highestp) FINFO **fp;
|
||||
int highestp;
|
||||
int trim_finfo_highest(FINFO **fp, int highestp)
|
||||
{
|
||||
register FINFO *tp, *sp, *mp, *cp, *pp;
|
||||
register int num, pnum;
|
||||
@ -1680,8 +1654,7 @@ int highestp;
|
||||
* are got rid of.
|
||||
*/
|
||||
|
||||
int trim_finfo_version(fp, rver) FINFO **fp;
|
||||
int rver;
|
||||
int trim_finfo_version(FINFO **fp, int rver)
|
||||
{
|
||||
register FINFO *tp, *sp, *mp, *cp, *pp, *vp;
|
||||
register int num, pnum;
|
||||
@ -1872,8 +1845,7 @@ int rver;
|
||||
* Caller have to free the area after sorting done.
|
||||
*/
|
||||
|
||||
FINFO **prepare_sort_buf(fp, n) register FINFO *fp;
|
||||
register int n;
|
||||
FINFO **prepare_sort_buf(register FINFO *fp, register int n)
|
||||
{
|
||||
register FINFO **bp;
|
||||
register FINFO **bufp;
|
||||
@ -1906,8 +1878,7 @@ register int n;
|
||||
* Note that the result is in the reversed order.
|
||||
*/
|
||||
|
||||
int dsk_filecmp(fp1, fp2) FINFO **fp1;
|
||||
FINFO **fp2;
|
||||
int dsk_filecmp(FINFO **fp1, FINFO **fp2)
|
||||
{
|
||||
register int res, v1, v2;
|
||||
|
||||
@ -1938,8 +1909,7 @@ FINFO **fp2;
|
||||
* Note that the result is in the reversed order.
|
||||
*/
|
||||
|
||||
int unix_filecmp(f1, f2) register FINFO **f1;
|
||||
register FINFO **f2;
|
||||
int unix_filecmp(register FINFO **f1, register FINFO **f2)
|
||||
{ return (strcmp((*f1)->lname, (*f2)->lname)); }
|
||||
|
||||
/*
|
||||
@ -1961,9 +1931,7 @@ register FINFO **f2;
|
||||
* used for {DSK} and {UNIX} device respectively as a sort function.
|
||||
*/
|
||||
|
||||
int file_sort(fpp, n, sortfn) register FINFO **fpp;
|
||||
register int n;
|
||||
register int (*sortfn)();
|
||||
int file_sort(register FINFO **fpp, register int n, register int (*sortfn)())
|
||||
{
|
||||
register FINFO **fp;
|
||||
register FINFO **sort_bufp;
|
||||
@ -2097,7 +2065,7 @@ typedef struct ufsgfs {
|
||||
* Enumerates files matching pattern.
|
||||
*/
|
||||
|
||||
LispPTR COM_gen_files(args) register LispPTR *args;
|
||||
LispPTR COM_gen_files(register LispPTR *args)
|
||||
{
|
||||
char fbuf[MAXPATHLEN + 5], dir[MAXPATHLEN], pattern[MAXPATHLEN];
|
||||
char host[MAXNAMLEN], name[MAXNAMLEN], ver[VERSIONLEN], drive[1];
|
||||
@ -2254,7 +2222,7 @@ LispPTR COM_gen_files(args) register LispPTR *args;
|
||||
* name.
|
||||
*/
|
||||
|
||||
LispPTR COM_next_file(args) register LispPTR *args;
|
||||
LispPTR COM_next_file(register LispPTR *args)
|
||||
{
|
||||
register LispPTR laddr;
|
||||
register FPROP *pp;
|
||||
@ -2325,7 +2293,7 @@ LispPTR COM_next_file(args) register LispPTR *args;
|
||||
* Abandon all cached information corresponding to the generator.
|
||||
*/
|
||||
|
||||
LispPTR COM_finish_finfo(args) register LispPTR *args;
|
||||
LispPTR COM_finish_finfo(register LispPTR *args)
|
||||
{
|
||||
register DFINFO *dfp;
|
||||
register FINFO *fp;
|
||||
|
||||
44
src/dlpi.c
44
src/dlpi.c
@ -98,7 +98,7 @@ int truncation = 1500;
|
||||
/*
|
||||
* setup_dlpi_dev - set up the data link provider interface.
|
||||
*/
|
||||
int setup_dlpi_dev(device) char *device;
|
||||
int setup_dlpi_dev(char *device)
|
||||
{
|
||||
char *p;
|
||||
u_int chunksz;
|
||||
@ -298,7 +298,7 @@ int setup_dlpi_dev(device) char *device;
|
||||
/*
|
||||
* flush_dlpi - flush data from the dlpi.
|
||||
*/
|
||||
void flush_dlpi(fd) int fd;
|
||||
void flush_dlpi(int fd)
|
||||
{
|
||||
if (ioctl(fd, I_FLUSH, (char *)FLUSHR) < 0) {
|
||||
perror("ioctl: I_FLUSH");
|
||||
@ -309,7 +309,7 @@ void flush_dlpi(fd) int fd;
|
||||
/*
|
||||
* dlpi_devtype - determine the type of device we're looking at.
|
||||
*/
|
||||
int dlpi_devtype(fd) int fd;
|
||||
int dlpi_devtype(int fd)
|
||||
{
|
||||
long buf[DLPI_MAXDLBUF];
|
||||
union DL_primitives *dlp;
|
||||
@ -338,7 +338,7 @@ int dlpi_devtype(fd) int fd;
|
||||
/*
|
||||
* dlinforeq - request information about the data link provider.
|
||||
*/
|
||||
static void dlinforeq(fd) int fd;
|
||||
static void dlinforeq(int fd)
|
||||
{
|
||||
dl_info_req_t info_req;
|
||||
struct strbuf ctl;
|
||||
@ -361,8 +361,7 @@ static void dlinforeq(fd) int fd;
|
||||
/*
|
||||
* dlattachreq - send a request to attach.
|
||||
*/
|
||||
static void dlattachreq(fd, ppa) u_long ppa;
|
||||
int fd;
|
||||
static void dlattachreq(int fd, u_long ppa)
|
||||
{
|
||||
dl_attach_req_t attach_req;
|
||||
struct strbuf ctl;
|
||||
@ -387,8 +386,7 @@ int fd;
|
||||
/*
|
||||
* dlpromisconreq - send a request to turn promiscuous mode on.
|
||||
*/
|
||||
static void dlpromisconreq(fd, level) u_long level;
|
||||
int fd;
|
||||
static void dlpromisconreq(int fd, u_long level)
|
||||
{
|
||||
dl_promiscon_req_t promiscon_req;
|
||||
struct strbuf ctl;
|
||||
@ -413,9 +411,7 @@ int fd;
|
||||
/*
|
||||
* dlbindreq - send a request to bind.
|
||||
*/
|
||||
static void dlbindreq(fd, sap, max_conind, service_mode, conn_mgmt, xidtest) u_long sap, max_conind,
|
||||
service_mode, conn_mgmt, xidtest;
|
||||
int fd;
|
||||
static void dlbindreq(int fd, u_long sap, u_long max_conind, u_long service_mode, u_long conn_mgmt, u_long xidtest)
|
||||
{
|
||||
dl_bind_req_t bind_req;
|
||||
struct strbuf ctl;
|
||||
@ -448,8 +444,7 @@ int fd;
|
||||
/*
|
||||
* dlokack - general acknowledgement reception.
|
||||
*/
|
||||
static int dlokack(fd, bufp) char *bufp;
|
||||
int fd;
|
||||
static int dlokack(int fd, char *bufp)
|
||||
{
|
||||
union DL_primitives *dlp;
|
||||
struct strbuf ctl;
|
||||
@ -477,8 +472,7 @@ int fd;
|
||||
/*
|
||||
* dlinfoack - receive an ack to a dlinforeq.
|
||||
*/
|
||||
static int dlinfoack(fd, bufp) char *bufp;
|
||||
int fd;
|
||||
static int dlinfoack(int fd, char *bufp)
|
||||
{
|
||||
union DL_primitives *dlp;
|
||||
struct strbuf ctl;
|
||||
@ -506,8 +500,7 @@ int fd;
|
||||
/*
|
||||
* dlbindack - receive an ack to a dlbindreq.
|
||||
*/
|
||||
static int dlbindack(fd, bufp) char *bufp;
|
||||
int fd;
|
||||
static int dlbindack(int fd, char *bufp)
|
||||
{
|
||||
union DL_primitives *dlp;
|
||||
struct strbuf ctl;
|
||||
@ -533,8 +526,7 @@ int fd;
|
||||
/*
|
||||
* expecting - see if we got what we wanted.
|
||||
*/
|
||||
static int expecting(prim, dlp) union DL_primitives *dlp;
|
||||
int prim;
|
||||
static int expecting(int prim, union DL_primitives *dlp)
|
||||
{
|
||||
if (dlp->dl_primitive != (u_long)prim) return (-1);
|
||||
|
||||
@ -544,10 +536,7 @@ int prim;
|
||||
/*
|
||||
* strgetmsg - get a message from a stream, with timeout.
|
||||
*/
|
||||
static int strgetmsg(fd, ctlp, datap, flagsp, caller) struct strbuf *ctlp, *datap;
|
||||
char *caller;
|
||||
int *flagsp;
|
||||
int fd;
|
||||
static int strgetmsg(int fd, struct strbuf *ctlp, struct strbuf *datap, int *flagsp, char *caller)
|
||||
{
|
||||
int rc;
|
||||
void sigalrm();
|
||||
@ -602,7 +591,7 @@ static void sigalrm() { (void)fprintf(stderr, "dlpi: timeout\n"); }
|
||||
/*
|
||||
* savestr - save string in dynamic memory.
|
||||
*/
|
||||
char *savestr(s) char *s;
|
||||
char *savestr(char *s)
|
||||
{
|
||||
char *t;
|
||||
char *malloc();
|
||||
@ -617,12 +606,7 @@ char *savestr(s) char *s;
|
||||
return (t);
|
||||
}
|
||||
|
||||
dlunitdatareq(fd, addrp, addrlen, minpri, maxpri, datap, datalen) int fd;
|
||||
u_char *addrp;
|
||||
int addrlen;
|
||||
u_long minpri, maxpri;
|
||||
u_char *datap;
|
||||
int datalen;
|
||||
int dlunitdatareq(int fd, u_char *addrp, int addrlen, u_long minpri, u_long maxpri, u_char *datap, int datalen)
|
||||
{
|
||||
long buf[DLPI_MAXDLBUF];
|
||||
union DL_primitives *dlp;
|
||||
|
||||
@ -246,7 +246,7 @@ extern u_char DOSLispKeyMap_101[];
|
||||
/* normal DOS handler. */
|
||||
/************************************************************************/
|
||||
|
||||
ExitDosKbd(kbd) KbdInterface kbd;
|
||||
void ExitDosKbd(KbdInterface kbd)
|
||||
{
|
||||
if (kbd->device.active == TRUE) {
|
||||
kbd->device.active = FALSE;
|
||||
@ -278,7 +278,7 @@ ExitDosKbd(kbd) KbdInterface kbd;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
EnterDosKbd(kbd) KbdInterface kbd;
|
||||
void EnterDosKbd(KbdInterface kbd)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
@ -61,8 +61,7 @@ extern LispPTR *LASTUSERACTION68k;
|
||||
void ButtonTimer();
|
||||
void MouseButtonSignal();
|
||||
|
||||
void EnterDosMouse(mouse, dsp) MouseInterface mouse;
|
||||
DspInterface dsp;
|
||||
void EnterDosMouse(MouseInterface mouse, DspInterface dsp)
|
||||
{
|
||||
union REGS regs;
|
||||
|
||||
@ -150,7 +149,7 @@ DspInterface dsp;
|
||||
mouse->device.active = TRUE;
|
||||
}
|
||||
|
||||
void ExitDosMouse(mouse) MouseInterface mouse;
|
||||
void ExitDosMouse(MouseInterface mouse)
|
||||
{
|
||||
if (mouse->device.active) {
|
||||
/* Unlock myself */
|
||||
@ -188,8 +187,7 @@ void ExitDosMouse(mouse) MouseInterface mouse;
|
||||
}
|
||||
}
|
||||
|
||||
void DosMouseAfterRaid(mouse, dsp) MouseInterface mouse;
|
||||
DspInterface dsp;
|
||||
void DosMouseAfterRaid(MouseInterface mouse, DspInterface dsp)
|
||||
{
|
||||
union REGS regs;
|
||||
|
||||
@ -207,8 +205,7 @@ DspInterface dsp;
|
||||
mouse->device.active = TRUE;
|
||||
}
|
||||
|
||||
void DosMouseBeforeRaid(mouse, dsp) MouseInterface mouse;
|
||||
DspInterface dsp;
|
||||
void DosMouseBeforeRaid(MouseInterface mouse, DspInterface dsp)
|
||||
{ mouse->device.active = FALSE; }
|
||||
|
||||
/***************************************************************/
|
||||
@ -217,8 +214,7 @@ DspInterface dsp;
|
||||
/* and not to the emulator displaybuffer we can make the cursor*/
|
||||
/* invissible just by updateing the area under the cursor! */
|
||||
/***************************************************************/
|
||||
void dos_cursor_invissible(dsp, iop) DspInterface dsp;
|
||||
IOPAGE *iop;
|
||||
void dos_cursor_invissible(DspInterface dsp, IOPAGE *iop)
|
||||
|
||||
{ (dsp->bitblt_to_screen)(dsp, DisplayRegion68k, iop->dlcursorx, iop->dlcursory, 16, 16); }
|
||||
|
||||
@ -236,8 +232,7 @@ IOPAGE *iop;
|
||||
/* */
|
||||
/***************************************************************/
|
||||
|
||||
set_DOSmouseposition(dsp, x, y) DspInterface dsp;
|
||||
int x, y;
|
||||
set_DOSmouseposition(DspInterface dsp, int x, int y)
|
||||
|
||||
{
|
||||
union REGS regs;
|
||||
@ -268,7 +263,7 @@ int x, y;
|
||||
currentmouse->device.active--;
|
||||
}
|
||||
|
||||
void docopy(newx, newy) int newx, newy;
|
||||
void docopy(int newx, int newy)
|
||||
{
|
||||
register DLword *srcbase, *dstbase;
|
||||
static int sx, dx, w = 16, h = 16, srcbpl, dstbpl, backwardflg = 0;
|
||||
@ -291,7 +286,7 @@ void docopy(newx, newy) int newx, newy;
|
||||
#endif /* NEWBITBLT */
|
||||
}
|
||||
|
||||
dostaking_mouse_up(newx, newy) int newx, newy;
|
||||
dostaking_mouse_up(int newx, int newy)
|
||||
{
|
||||
/* save hidden bitmap */
|
||||
|
||||
@ -342,8 +337,7 @@ dostaking_mouse_up(newx, newy) int newx, newy;
|
||||
currentmouse->Cursor.Last.y, w, h);
|
||||
}
|
||||
|
||||
dostaking_mouse_down(dsp, iop) DspInterface dsp;
|
||||
IOPAGE *iop;
|
||||
dostaking_mouse_down(DspInterface dsp, IOPAGE *iop)
|
||||
{
|
||||
register DLword *srcbase, *dstbase;
|
||||
static int sx, dx, w, h, srcbpl, dstbpl, backwardflg = 0;
|
||||
@ -381,7 +375,7 @@ IOPAGE *iop;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void MouseButtonSignal(mouse) MouseInterface mouse;
|
||||
void MouseButtonSignal(MouseInterface mouse)
|
||||
{
|
||||
DLword w, r;
|
||||
KBEVENT *kbevent;
|
||||
|
||||
10
src/draw.c
10
src/draw.c
@ -58,7 +58,7 @@ extern int MonoOrColor;
|
||||
#endif /* COLOR */
|
||||
|
||||
#ifdef DISPLAYBUFFER
|
||||
LispPTR n_new_cursorin_CG6(dx, dy, w, h) register int dx, dy, w, h;
|
||||
LispPTR n_new_cursorin_CG6(int dx, int dy, int w, int h)
|
||||
{
|
||||
if ((dx < MOUSEXR) && (dx + w > MOUSEXL) && (dy < MOUSEYH) && (dy + h > MOUSEYL))
|
||||
return (T);
|
||||
@ -127,13 +127,7 @@ plot:
|
||||
#define DISPLAYBUFFER
|
||||
#endif /* XWINDOW */
|
||||
|
||||
int N_OP_drawline(ptr, curbit, xsize, width, ysize, op, delta, numx, numy) register int curbit,
|
||||
xsize;
|
||||
int width;
|
||||
register int ysize;
|
||||
int op;
|
||||
register int delta, numx, numy;
|
||||
LispPTR ptr;
|
||||
int N_OP_drawline(LispPTR ptr, int curbit, int xsize, int width, int ysize, int op, int delta, int numx, int numy)
|
||||
{
|
||||
register DLword *dataptr;
|
||||
ScreenLocked = T;
|
||||
|
||||
90
src/dsk.c
90
src/dsk.c
@ -185,12 +185,10 @@ FileName *VersionlessP();
|
||||
*/
|
||||
|
||||
#ifdef DOS
|
||||
void separate_host(lfname, host, drive) char *drive;
|
||||
void separate_host(char *lfname, char *host, char *drive)
|
||||
#else
|
||||
void separate_host(lfname, host)
|
||||
void separate_host(char *lfname, char *host)
|
||||
#endif /* DOS */
|
||||
register char *lfname;
|
||||
register char *host;
|
||||
{
|
||||
register char *cp;
|
||||
register int diff;
|
||||
@ -273,7 +271,7 @@ register char *host;
|
||||
* open a specified file.
|
||||
*/
|
||||
|
||||
LispPTR COM_openfile(args) register LispPTR *args;
|
||||
LispPTR COM_openfile(register LispPTR *args)
|
||||
{
|
||||
char lfname[MAXPATHLEN + 5], file[MAXPATHLEN], host[MAXNAMLEN];
|
||||
char dir[MAXPATHLEN], name[MAXNAMLEN], ver[VERSIONLEN];
|
||||
@ -612,7 +610,7 @@ LispPTR COM_openfile(args) register LispPTR *args;
|
||||
* Lisp and it is passed to COM_closefile.
|
||||
*/
|
||||
|
||||
LispPTR COM_closefile(args) register LispPTR *args;
|
||||
LispPTR COM_closefile(register LispPTR *args)
|
||||
{
|
||||
#ifdef DOS
|
||||
|
||||
@ -910,7 +908,7 @@ LispPTR COM_closefile(args) register LispPTR *args;
|
||||
* can open the file with the specified mode or not.
|
||||
*/
|
||||
|
||||
LispPTR DSK_getfilename(args) register LispPTR *args;
|
||||
LispPTR DSK_getfilename(register LispPTR *args)
|
||||
{
|
||||
register char *base;
|
||||
register int len, dirp, rval;
|
||||
@ -1197,7 +1195,7 @@ LispPTR DSK_getfilename(args) register LispPTR *args;
|
||||
* a specified file.
|
||||
*/
|
||||
|
||||
LispPTR DSK_deletefile(args) register LispPTR *args;
|
||||
LispPTR DSK_deletefile(register LispPTR *args)
|
||||
{
|
||||
char file[MAXPATHLEN], fbuf[MAXPATHLEN], vless[MAXPATHLEN];
|
||||
char dir[MAXPATHLEN], ver[VERSIONLEN];
|
||||
@ -1343,7 +1341,7 @@ LispPTR DSK_deletefile(args) register LispPTR *args;
|
||||
* a specified file.
|
||||
*/
|
||||
|
||||
LispPTR DSK_renamefile(args) register LispPTR *args;
|
||||
LispPTR DSK_renamefile(register LispPTR *args)
|
||||
{
|
||||
char src[MAXPATHLEN], dst[MAXPATHLEN];
|
||||
char fbuf[MAXPATHLEN], vless[MAXPATHLEN], svless[MAXPATHLEN];
|
||||
@ -1568,7 +1566,7 @@ LispPTR DSK_renamefile(args) register LispPTR *args;
|
||||
* the directory name representation.
|
||||
*/
|
||||
|
||||
LispPTR DSK_directorynamep(args) register LispPTR *args;
|
||||
LispPTR DSK_directorynamep(register LispPTR *args)
|
||||
{
|
||||
char dirname[MAXPATHLEN];
|
||||
char fullname[MAXPATHLEN];
|
||||
@ -1653,7 +1651,7 @@ LispPTR DSK_directorynamep(args) register LispPTR *args;
|
||||
* Lisp sense.
|
||||
*/
|
||||
|
||||
LispPTR COM_getfileinfo(args) register LispPTR *args;
|
||||
LispPTR COM_getfileinfo(register LispPTR *args)
|
||||
{
|
||||
register int dskp, rval;
|
||||
register unsigned *bufp;
|
||||
@ -1852,7 +1850,7 @@ LispPTR COM_getfileinfo(args) register LispPTR *args;
|
||||
* make sense.
|
||||
*/
|
||||
|
||||
LispPTR COM_setfileinfo(args) register LispPTR *args;
|
||||
LispPTR COM_setfileinfo(register LispPTR *args)
|
||||
{
|
||||
register int dskp, rval, date;
|
||||
char lfname[MAXPATHLEN + 5], file[MAXPATHLEN], host[MAXNAMLEN];
|
||||
@ -1987,7 +1985,7 @@ LispPTR COM_setfileinfo(args) register LispPTR *args;
|
||||
* remaining region of a buffer will be zero outed. The size of a page is 512 bytes.
|
||||
*/
|
||||
|
||||
LispPTR COM_readpage(args) register LispPTR *args;
|
||||
LispPTR COM_readpage(register LispPTR *args)
|
||||
{
|
||||
register char *bufp;
|
||||
register char *bp;
|
||||
@ -2070,7 +2068,7 @@ rdlp:
|
||||
* The actual size of data written is specified with args[3].
|
||||
*/
|
||||
|
||||
LispPTR COM_writepage(args) register LispPTR *args;
|
||||
LispPTR COM_writepage(register LispPTR *args)
|
||||
{
|
||||
register int fd;
|
||||
register int npage;
|
||||
@ -2145,7 +2143,7 @@ wlp:
|
||||
* truncate a file.
|
||||
*/
|
||||
|
||||
LispPTR COM_truncatefile(args) register LispPTR *args;
|
||||
LispPTR COM_truncatefile(register LispPTR *args)
|
||||
{
|
||||
register int fd;
|
||||
register int length;
|
||||
@ -2224,7 +2222,7 @@ LispPTR COM_truncatefile(args) register LispPTR *args;
|
||||
* Change the current directory of the process to the specified directory.
|
||||
*/
|
||||
|
||||
LispPTR COM_changedir(args) register LispPTR *args;
|
||||
LispPTR COM_changedir(register LispPTR *args)
|
||||
{
|
||||
register int dskp, rval;
|
||||
char lfname[MAXPATHLEN + 5], dir[MAXPATHLEN], host[MAXNAMLEN];
|
||||
@ -2323,7 +2321,7 @@ LispPTR COM_changedir(args) register LispPTR *args;
|
||||
* strips the version field by invoking DSK_getfilename with NON recognition mode.
|
||||
*/
|
||||
|
||||
LispPTR COM_getfreeblock(args) register LispPTR *args;
|
||||
LispPTR COM_getfreeblock(register LispPTR *args)
|
||||
{
|
||||
register int dskp, rval, *buf;
|
||||
char lfname[MAXPATHLEN + 5], dir[MAXPATHLEN], host[MAXNAMLEN];
|
||||
@ -2495,9 +2493,7 @@ LispPTR COM_getfreeblock(args) register LispPTR *args;
|
||||
*
|
||||
*/
|
||||
|
||||
void separate_version(name, ver, checkp) register char *name;
|
||||
register char *ver;
|
||||
register int checkp;
|
||||
void separate_version(char *name, char *ver, int checkp)
|
||||
{
|
||||
register char *start, *end, *cp;
|
||||
register int len, ver_no;
|
||||
@ -2553,8 +2549,7 @@ NO:
|
||||
}
|
||||
|
||||
#ifdef DOS
|
||||
void separate_drive(lfname, drive) register char *lfname;
|
||||
char *drive;
|
||||
void separate_drive(char *lfname, char *drive)
|
||||
{
|
||||
register char *cp;
|
||||
|
||||
@ -2603,11 +2598,7 @@ char *drive;
|
||||
*
|
||||
*/
|
||||
|
||||
int unpack_filename(file, dir, name, ver, checkp) register char *file;
|
||||
register char *dir;
|
||||
register char *name;
|
||||
register char *ver;
|
||||
register int checkp;
|
||||
int unpack_filename(char *file, char *dir, char *name, char *ver, int checkp)
|
||||
{
|
||||
register char *cp;
|
||||
|
||||
@ -2658,7 +2649,7 @@ register int checkp;
|
||||
*
|
||||
*/
|
||||
|
||||
int true_name(path) register char *path;
|
||||
int true_name(register char *path)
|
||||
{
|
||||
char dir[MAXPATHLEN];
|
||||
char name[MAXNAMLEN], drive[1];
|
||||
@ -2744,8 +2735,7 @@ int true_name(path) register char *path;
|
||||
*
|
||||
*/
|
||||
|
||||
int locate_file(dir, name) register char *dir;
|
||||
register char *name;
|
||||
int locate_file(char *dir, char *name)
|
||||
{
|
||||
#ifdef DOS
|
||||
char path[MAXPATHLEN];
|
||||
@ -2846,7 +2836,7 @@ register char *name;
|
||||
*
|
||||
*/
|
||||
|
||||
int make_directory(dir) register char *dir;
|
||||
int make_directory(register char *dir)
|
||||
{
|
||||
register char *cp, *dp;
|
||||
register int maked, rval;
|
||||
@ -3101,10 +3091,7 @@ int make_directory(dir) register char *dir;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int get_version_array(dir, file, varray, cache) register char *dir;
|
||||
register char *file;
|
||||
register FileName *varray;
|
||||
register CurrentVArray *cache;
|
||||
int get_version_array(char *dir, char *file, FileName *varray, CurrentVArray *cache)
|
||||
{
|
||||
#ifdef DOS
|
||||
|
||||
@ -3340,9 +3327,7 @@ register CurrentVArray *cache;
|
||||
* to maintain the directory on which a file is being created.
|
||||
*/
|
||||
|
||||
int maintain_version(file, varray, forcep) register char *file;
|
||||
register FileName *varray;
|
||||
register int forcep;
|
||||
int maintain_version(char *file, FileName *varray, int forcep)
|
||||
{
|
||||
char dir[MAXPATHLEN], fname[MAXNAMLEN], ver[VERSIONLEN];
|
||||
char old_file[MAXPATHLEN], vless[MAXPATHLEN];
|
||||
@ -3503,9 +3488,7 @@ register int forcep;
|
||||
*
|
||||
*/
|
||||
|
||||
int get_versionless(varray, file, dir) register FileName *varray;
|
||||
register char *file;
|
||||
register char *dir;
|
||||
int get_versionless(FileName *varray, char *file, char *dir)
|
||||
{
|
||||
#ifdef DOS
|
||||
return (0);
|
||||
@ -3558,10 +3541,7 @@ register char *dir;
|
||||
*
|
||||
*/
|
||||
|
||||
int check_vless_link(vless, varray, to_file, highest_p) register char *vless;
|
||||
register FileName *varray;
|
||||
register char *to_file;
|
||||
register int *highest_p;
|
||||
int check_vless_link(char *vless, FileName *varray, char *to_file, int *highest_p)
|
||||
{
|
||||
register int rval, max_no, found;
|
||||
ino_t vless_ino;
|
||||
@ -3662,10 +3642,7 @@ register int *highest_p;
|
||||
*
|
||||
*/
|
||||
|
||||
int get_old(dir, varray, afile, vfile) register char *dir;
|
||||
register FileName *varray;
|
||||
register char *afile;
|
||||
register char *vfile;
|
||||
int get_old(char *dir, FileName *varray, char *afile, char *vfile)
|
||||
{
|
||||
char name[MAXPATHLEN], vless[MAXPATHLEN], to_file[MAXPATHLEN];
|
||||
char ver[VERSIONLEN], vbuf[VERSIONLEN];
|
||||
@ -3864,10 +3841,7 @@ register char *vfile;
|
||||
*
|
||||
*/
|
||||
|
||||
int get_oldest(dir, varray, afile, vfile) register char *dir;
|
||||
register FileName *varray;
|
||||
register char *afile;
|
||||
register char *vfile;
|
||||
int get_oldest(char *dir, FileName *varray, char *afile, char *vfile)
|
||||
{
|
||||
char name[MAXPATHLEN], vless[MAXPATHLEN], to_file[MAXPATHLEN];
|
||||
char ver[VERSIONLEN], vbuf[VERSIONLEN];
|
||||
@ -4064,10 +4038,7 @@ register char *vfile;
|
||||
*
|
||||
*/
|
||||
|
||||
int get_new(dir, varray, afile, vfile) register char *dir;
|
||||
register FileName *varray;
|
||||
register char *afile;
|
||||
register char *vfile;
|
||||
int get_new(char *dir, FileName *varray, char *afile, char *vfile)
|
||||
{
|
||||
char name[MAXPATHLEN], vless[MAXPATHLEN], to_file[MAXPATHLEN];
|
||||
char ver[VERSIONLEN], vbuf[VERSIONLEN];
|
||||
@ -4361,10 +4332,7 @@ register char *vfile;
|
||||
*
|
||||
*/
|
||||
|
||||
int get_old_new(dir, varray, afile, vfile) register char *dir;
|
||||
register FileName *varray;
|
||||
register char *afile;
|
||||
register char *vfile;
|
||||
int get_old_new(char *dir, FileName *varray, char *afile, char *vfile)
|
||||
{
|
||||
char name[MAXPATHLEN], vless[MAXPATHLEN], to_file[MAXPATHLEN];
|
||||
char ver[VERSIONLEN], vbuf[VERSIONLEN];
|
||||
|
||||
@ -42,7 +42,7 @@ extern int Mouse_Included;
|
||||
*
|
||||
****************************************************/
|
||||
|
||||
void DSP_dspbout(args) LispPTR *args; /* args[0] : charcode */
|
||||
void DSP_dspbout(LispPTR *args) /* args[0] : charcode */
|
||||
{ putc((args[0] & 0xFFFF) & 0x7f, BCPLDISPLAY); }
|
||||
|
||||
/****************************************************
|
||||
@ -54,7 +54,7 @@ void DSP_dspbout(args) LispPTR *args; /* args[0] : charcode */
|
||||
|
||||
extern int DisplayInitialized;
|
||||
|
||||
void DSP_showdisplay(args) LispPTR *args;
|
||||
void DSP_showdisplay(LispPTR *args)
|
||||
{ DisplayInitialized = 1; }
|
||||
|
||||
/****************************************************
|
||||
@ -64,7 +64,7 @@ void DSP_showdisplay(args) LispPTR *args;
|
||||
*
|
||||
****************************************************/
|
||||
|
||||
LispPTR DSP_VideoColor(args) LispPTR *args; /* args[0] : black flag */
|
||||
LispPTR DSP_VideoColor(LispPTR *args) /* args[0] : black flag */
|
||||
{
|
||||
int invert;
|
||||
#ifdef SUNDISPLAY
|
||||
@ -92,9 +92,8 @@ extern int errno;
|
||||
* called from \HARDCURSORUP etc.
|
||||
*
|
||||
****************************************************/
|
||||
void DSP_Cursor(args, argnum) LispPTR *args;
|
||||
int argnum;
|
||||
/* args[0] : hot sopt X
|
||||
void DSP_Cursor(LispPTR *args, int argnum)
|
||||
/* args[0] : hot spot X
|
||||
* args[1] : hot spot Y
|
||||
*/
|
||||
{
|
||||
@ -156,10 +155,10 @@ int argnum;
|
||||
* called from macro \SETMOUSEXY etc.
|
||||
*
|
||||
****************************************************/
|
||||
|
||||
void DSP_SetMousePos(args) register LispPTR *args; /* args[0] : X pos
|
||||
* args[1] : Y pos
|
||||
*/
|
||||
/* args[0] : X pos
|
||||
* args[1] : Y pos
|
||||
*/
|
||||
void DSP_SetMousePos(register LispPTR *args)
|
||||
{
|
||||
#ifdef SUNDISPLAY
|
||||
#ifdef OLD_CURSOR
|
||||
@ -200,7 +199,7 @@ void DSP_SetMousePos(args) register LispPTR *args; /* args[0] : X pos
|
||||
* called from \Katana.DisplayWidth.
|
||||
*
|
||||
****************************************************/
|
||||
LispPTR DSP_ScreenWidth(args) LispPTR *args;
|
||||
LispPTR DSP_ScreenWidth(LispPTR *args)
|
||||
{ return (S_POSITIVE | (0xFFFF & displaywidth)); }
|
||||
|
||||
/****************************************************
|
||||
@ -209,7 +208,7 @@ LispPTR DSP_ScreenWidth(args) LispPTR *args;
|
||||
* called from \Katana.DisplayHeight.
|
||||
*
|
||||
****************************************************/
|
||||
LispPTR DSP_ScreenHight(args) LispPTR *args;
|
||||
LispPTR DSP_ScreenHight(LispPTR *args)
|
||||
{ return (S_POSITIVE | (0xFFFF & displayheight)); }
|
||||
|
||||
/****************************************************
|
||||
|
||||
58
src/ejlisp.c
58
src/ejlisp.c
@ -164,7 +164,7 @@ int ejlisp_kouho_next;
|
||||
#define WNN_BUNSETSU_KANJI 15
|
||||
#define WNN_BUNSETSU_YOMI 16
|
||||
|
||||
ejlisp(args) int args[];
|
||||
ejlisp(int args[])
|
||||
{
|
||||
int result;
|
||||
int i, j, length;
|
||||
@ -451,10 +451,7 @@ ejlisp(args) int args[];
|
||||
return (GetSmallp(result));
|
||||
}
|
||||
|
||||
ejlisp_add_userdic(dic_no, kanji, yomi, hinshi) int dic_no;
|
||||
unsigned short *kanji;
|
||||
unsigned short *yomi;
|
||||
int hinshi;
|
||||
int ejlisp_add_userdic(int dic_no, unsigned short *kanji, unsigned short *yomi, int hinshi)
|
||||
{
|
||||
int result;
|
||||
#ifdef DEBUG
|
||||
@ -477,8 +474,7 @@ int hinshi;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_bunsetsu_kanji(bunsetsu_no, bunsetsu_no2, kanji_len) int bunsetsu_no, bunsetsu_no2;
|
||||
int *kanji_len;
|
||||
int ejlisp_bunsetsu_kanji(int bunsetsu_no, int bunsetsu_no2, int *kanji_len)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_bunsetsu_kanji start\n");
|
||||
@ -500,8 +496,7 @@ int *kanji_len;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_bunsetsu_yomi(bunsetsu_no, bunsetsu_no2, yomi_len) int bunsetsu_no, bunsetsu_no2;
|
||||
int *yomi_len;
|
||||
int ejlisp_bunsetsu_yomi(int bunsetsu_no, int bunsetsu_no2, int *yomi_len)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_bunsetsu_yomi start\n");
|
||||
@ -523,7 +518,7 @@ int *yomi_len;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_close() {
|
||||
int ejlisp_close() {
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_close start\n");
|
||||
#endif
|
||||
@ -543,9 +538,7 @@ ejlisp_close() {
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_conv(yomi, kanji, kanji_len, bunsetsu_suu) unsigned short *yomi;
|
||||
unsigned short *kanji;
|
||||
int *kanji_len, *bunsetsu_suu;
|
||||
int ejlisp_conv(unsigned short *yomi, unsigned short *kanji, int *kanji_len, int *bunsetsu_suu)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_conv start\n");
|
||||
@ -569,7 +562,7 @@ int *kanji_len, *bunsetsu_suu;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_conv_end() {
|
||||
int ejlisp_conv_end() {
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_conv_end start\n");
|
||||
#endif
|
||||
@ -589,7 +582,7 @@ ejlisp_conv_end() {
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_del_userdic(dic_no, entry) {
|
||||
int ejlisp_del_userdic(int dic_no, int entry) {
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_del_userdic start\n");
|
||||
printf("dic_no = %d,entry = %d\n", dic_no, entry);
|
||||
@ -610,9 +603,8 @@ ejlisp_del_userdic(dic_no, entry) {
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_get_kouho(pos, kouho_arrey,
|
||||
kouho_num) unsigned short kouho_arrey[TABLE_MAX][CHAR_MAXLEN + 1];
|
||||
int pos, *kouho_num;
|
||||
int ejlisp_get_kouho(int pos, unsigned short kouho_arrey[TABLE_MAX][CHAR_MAXLEN + 1],
|
||||
int *kouho_num)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
@ -664,10 +656,7 @@ int pos, *kouho_num;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_get_userdic(kouho_arrey, kouho_len_arrey,
|
||||
kouho_entry_arrey) unsigned short kouho_arrey[TABLE_MAX][CHAR_MAXLEN + 1];
|
||||
int kouho_len_arrey[TABLE_MAX];
|
||||
int kouho_entry_arrey[TABLE_MAX];
|
||||
int ejlisp_get_userdic(unsigned short kouho_arrey[TABLE_MAX][CHAR_MAXLEN + 1], int kouho_len_arrey[TABLE_MAX], int kouho_entry_arrey[TABLE_MAX])
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -692,10 +681,7 @@ int kouho_entry_arrey[TABLE_MAX];
|
||||
return (0);
|
||||
}
|
||||
|
||||
ejlisp_get_userdic_name(dic_name_array, dic_name_len_array,
|
||||
dic_no_array) unsigned short dic_name_array[TABLE_MAX][CHAR_MAXLEN + 1];
|
||||
int dic_name_len_array[TABLE_MAX];
|
||||
int dic_no_array[TABLE_MAX];
|
||||
int ejlisp_get_userdic_name(unsigned short dic_name_array[TABLE_MAX][CHAR_MAXLEN + 1], int dic_name_len_array[TABLE_MAX], int dic_no_array[TABLE_MAX])
|
||||
{
|
||||
WNN_DIC_INFO *dip;
|
||||
int i, j;
|
||||
@ -736,9 +722,7 @@ int dic_no_array[TABLE_MAX];
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_get_yomi(bunsetsu_no, yomi, yomi_len) int bunsetsu_no;
|
||||
char *yomi;
|
||||
int *yomi_len;
|
||||
int ejlisp_get_yomi(int bunsetsu_no, char *yomi, int *yomi_len)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_get_yomi start\n");
|
||||
@ -760,8 +744,7 @@ int *yomi_len;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_open(wnn_env, kouho_max, server_name) char *wnn_env, *server_name;
|
||||
int kouho_max;
|
||||
int ejlisp_open(char *wnn_env, int kouho_max, char *server_name)
|
||||
{
|
||||
char username[L_cuserid];
|
||||
char *env_name;
|
||||
@ -795,10 +778,7 @@ int kouho_max;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_reconv(bunsetsu_no, bunsetsu_len, kanji, kanji_len, bunsetsu_suu) int bunsetsu_no,
|
||||
bunsetsu_len;
|
||||
unsigned short kanji[];
|
||||
int *kanji_len, *bunsetsu_suu;
|
||||
int ejlisp_reconv(int bunsetsu_no, int bunsetsu_len, unsigned short kanji[], int *kanji_len, int *bunsetsu_suu)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_reconv start\n");
|
||||
@ -823,8 +803,7 @@ int *kanji_len, *bunsetsu_suu;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_search_userdic(dic_no, yomi) int dic_no;
|
||||
unsigned short *yomi;
|
||||
int ejlisp_search_userdic(int dic_no, unsigned short *yomi)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_search_userdic start\n");
|
||||
@ -846,7 +825,7 @@ unsigned short *yomi;
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_select_bunsetsu(bunsetsu_no, bunsetsu_len) int bunsetsu_no, *bunsetsu_len;
|
||||
int ejlisp_select_bunsetsu(int bunsetsu_no, int *bunsetsu_len)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("ejlisp_select_bunsetsu start\n");
|
||||
@ -873,8 +852,7 @@ ejlisp_select_bunsetsu(bunsetsu_no, bunsetsu_len) int bunsetsu_no, *bunsetsu_len
|
||||
return (wnn_errorno);
|
||||
}
|
||||
|
||||
ejlisp_select_kouho(kouho_no, kanji) int kouho_no;
|
||||
unsigned short *kanji;
|
||||
int ejlisp_select_kouho(int kouho_no, unsigned short *kanji)
|
||||
{
|
||||
int no, i, c;
|
||||
|
||||
|
||||
23
src/ether.c
23
src/ether.c
@ -159,7 +159,7 @@ static struct nit_ioc nioc;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR ether_suspend(args) LispPTR args[];
|
||||
LispPTR ether_suspend(LispPTR args[])
|
||||
{
|
||||
#ifndef NOETHER
|
||||
#ifdef PKTFILTER
|
||||
@ -210,7 +210,7 @@ LispPTR ether_suspend(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR ether_resume(args) LispPTR args[];
|
||||
LispPTR ether_resume(LispPTR args[])
|
||||
{
|
||||
#ifndef NOETHER
|
||||
struct strioctl si;
|
||||
@ -257,7 +257,7 @@ LispPTR ether_resume(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR ether_ctrlr(args) LispPTR args[];
|
||||
LispPTR ether_ctrlr(LispPTR args[])
|
||||
{
|
||||
if (ether_fd < 0) return (NIL);
|
||||
return (ATOM_T);
|
||||
@ -267,7 +267,7 @@ LispPTR ether_ctrlr(args) LispPTR args[];
|
||||
* ether_reset(args) 175/73/0
|
||||
* reset ether controller and disable receipt of packets
|
||||
**********************************************************************/
|
||||
LispPTR ether_reset(args) LispPTR args[];
|
||||
LispPTR ether_reset(LispPTR args[])
|
||||
{
|
||||
int i;
|
||||
char hostnumber[6];
|
||||
@ -298,7 +298,7 @@ LispPTR ether_reset(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR ether_get(args) LispPTR args[];
|
||||
LispPTR ether_get(LispPTR args[])
|
||||
{
|
||||
LispPTR MaxByteCount;
|
||||
LispPTR result = NIL;
|
||||
@ -336,7 +336,7 @@ LispPTR ether_get(args) LispPTR args[];
|
||||
**********************************************************************/
|
||||
#define OFFSET sizeof(sa.sa_data)
|
||||
|
||||
LispPTR ether_send(args) LispPTR args[];
|
||||
LispPTR ether_send(LispPTR args[])
|
||||
{
|
||||
#ifndef NOETHER
|
||||
/*
|
||||
@ -401,7 +401,7 @@ LispPTR ether_send(args) LispPTR args[];
|
||||
* check whether a packet has come. if does, notify iocb
|
||||
**********************************************************************/
|
||||
|
||||
LispPTR ether_setfilter(args) LispPTR args[];
|
||||
LispPTR ether_setfilter(LispPTR args[])
|
||||
{ return (NIL); } /* ether_setfilter */
|
||||
|
||||
/**********************************************************************
|
||||
@ -638,7 +638,7 @@ LispPTR get_packet() {
|
||||
* This is believed obsolete with packet filtering enabled
|
||||
**********************************************************************/
|
||||
|
||||
int check_filter(buffer) u_char *buffer;
|
||||
int check_filter(u_char *buffer)
|
||||
{
|
||||
/* broadcast packets */
|
||||
if (ether_addr_equal(buffer, broadcast)) switch (((short *)buffer)[6]) {
|
||||
@ -661,10 +661,7 @@ int check_filter(buffer) u_char *buffer;
|
||||
* Also believed obsolete
|
||||
**********************************************************************/
|
||||
|
||||
int ether_addr_equal(add1, add2)
|
||||
|
||||
u_char add1[],
|
||||
add2[];
|
||||
int ether_addr_equal(u_char add1[], u_char add2[])
|
||||
{
|
||||
register int i;
|
||||
for (i = 0; i < 6; i++)
|
||||
@ -1045,7 +1042,7 @@ void init_ether() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR check_sum(args) register LispPTR *args;
|
||||
LispPTR check_sum(register LispPTR *args)
|
||||
{
|
||||
register LispPTR checksum;
|
||||
register DLword *address;
|
||||
|
||||
@ -41,8 +41,7 @@ Pixrect *PPM_to_Pixrect(), *PBM_to_Pixrect(), *SunRaster_to_Pixrect();
|
||||
#define MAX_BUFF_SIZE 1024
|
||||
static char buff[MAX_BUFF_SIZE];
|
||||
|
||||
int Pixrect_to_File(pix, name) Pixrect *pix;
|
||||
char *name;
|
||||
int Pixrect_to_File(Pixrect *pix, char *name)
|
||||
{
|
||||
FILE *file;
|
||||
int err = 0;
|
||||
@ -67,7 +66,7 @@ char *name;
|
||||
return (err);
|
||||
} /* end Pixrect_to_File */
|
||||
|
||||
Pixrect *File_to_Pixrect(name) char *name;
|
||||
Pixrect *File_to_Pixrect(char *name)
|
||||
{
|
||||
FILE *file;
|
||||
Pixrect *pix;
|
||||
@ -96,8 +95,7 @@ Pixrect *File_to_Pixrect(name) char *name;
|
||||
#define magic_number_PBM "P4"
|
||||
#define magic_number_PPM "P6"
|
||||
|
||||
Pixrect_to_PPM(file, pix) FILE *file;
|
||||
Pixrect *pix;
|
||||
void Pixrect_to_PPM(FILE *file, Pixrect *pix)
|
||||
{
|
||||
struct image_info info;
|
||||
|
||||
@ -110,7 +108,7 @@ Pixrect *pix;
|
||||
|
||||
} /* end Pixrect_to_PPM */
|
||||
|
||||
Pixrect *PPM_to_Pixrect(file) FILE *file;
|
||||
Pixrect *PPM_to_Pixrect(FILE *file)
|
||||
{
|
||||
Pixrect *pix;
|
||||
struct image_info info;
|
||||
@ -122,8 +120,7 @@ Pixrect *PPM_to_Pixrect(file) FILE *file;
|
||||
return (pix);
|
||||
} /* PPM_to_Pixrect */
|
||||
|
||||
Pixrect_to_PBM(file, pix) FILE *file;
|
||||
Pixrect *pix;
|
||||
void Pixrect_to_PBM(FILE *file, Pixrect *pix)
|
||||
{
|
||||
struct image_info info;
|
||||
|
||||
@ -136,7 +133,7 @@ Pixrect *pix;
|
||||
|
||||
} /* end Pixrect_to_PBM */
|
||||
|
||||
Pixrect *PBM_to_Pixrect(file) FILE *file;
|
||||
Pixrect *PBM_to_Pixrect(FILE *file)
|
||||
{
|
||||
Pixrect *pix;
|
||||
struct image_info info;
|
||||
@ -149,7 +146,7 @@ Pixrect *PBM_to_Pixrect(file) FILE *file;
|
||||
|
||||
} /* end PBM_to_Pixrect */
|
||||
|
||||
Pixrect *SunRaster_to_Pixrect(file) FILE *file;
|
||||
Pixrect *SunRaster_to_Pixrect(FILE *file)
|
||||
{
|
||||
Pixrect *pix;
|
||||
colormap_t cmap;
|
||||
@ -161,9 +158,7 @@ Pixrect *SunRaster_to_Pixrect(file) FILE *file;
|
||||
return (pix);
|
||||
} /* end SunRaster_to_Pixrect */
|
||||
|
||||
write_raw_PBM(file, data, width, height) FILE *file;
|
||||
unsigned char *data;
|
||||
int width, height;
|
||||
void write_raw_PBM(FILE *file, unsigned char *data, int width, int height)
|
||||
{
|
||||
int i, n, flg, len;
|
||||
|
||||
@ -174,9 +169,7 @@ int width, height;
|
||||
} /* end for( i ) */
|
||||
} /* end write_PBM_data */
|
||||
|
||||
read_raw_PBM(file, data, width, height) FILE *file;
|
||||
char *data;
|
||||
int width, height;
|
||||
void read_raw_PBM(FILE *file, char *data, int width, int height)
|
||||
{
|
||||
int n, i, flg, len;
|
||||
|
||||
@ -187,9 +180,7 @@ int width, height;
|
||||
} /* end for( i ) */
|
||||
} /* end read_raw_PBM */
|
||||
|
||||
write_raw_PPM(file, data, width, height) FILE *file;
|
||||
unsigned char *data;
|
||||
int width, height;
|
||||
void write_raw_PPM(FILE file, unsigned char *data, int width, int height)
|
||||
{
|
||||
struct rgb color24;
|
||||
int i, j, len;
|
||||
@ -204,9 +195,7 @@ int width, height;
|
||||
} /* end for( i ) */
|
||||
} /* end write_raw_PPM */
|
||||
|
||||
read_raw_PPM(file, data, width, height) FILE *file;
|
||||
unsigned char *data;
|
||||
int width, height;
|
||||
void read_raw_PPM(FILE *file, unsigned char *data, int width, int height)
|
||||
{
|
||||
struct rgb color24;
|
||||
int i, j, len;
|
||||
@ -221,7 +210,7 @@ int width, height;
|
||||
} /* end for( i ) */
|
||||
} /* endi read_raw_PPM */
|
||||
|
||||
int image_file_type(file) FILE *file;
|
||||
int image_file_type(FILE *file)
|
||||
{
|
||||
int c, file_type;
|
||||
|
||||
@ -249,8 +238,7 @@ int image_file_type(file) FILE *file;
|
||||
return (file_type);
|
||||
} /* end image_file_type */
|
||||
|
||||
read_PBM_header(file, info) FILE *file;
|
||||
struct image_info *info;
|
||||
int read_PBM_header(FILE *file, struct image_info *info)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -266,15 +254,13 @@ struct image_info *info;
|
||||
|
||||
} /* end read_PBM_header */
|
||||
|
||||
write_PBM_header(file, info) FILE *file;
|
||||
struct image_info *info;
|
||||
void write_PBM_header(FILE *file, struct image_info *info)
|
||||
{
|
||||
fprintf(file, "P4\n");
|
||||
fprintf(file, "%d %d\n", info->width, info->height);
|
||||
} /* write_PBM_header */
|
||||
|
||||
read_PPM_header(file, info) FILE *file;
|
||||
struct image_info *info;
|
||||
int read_PPM_header(FILE *file, struct image_info *info)
|
||||
{
|
||||
int err;
|
||||
|
||||
@ -292,15 +278,14 @@ struct image_info *info;
|
||||
|
||||
} /* read_PPM_header */
|
||||
|
||||
write_PPM_header(file, info) FILE *file;
|
||||
struct image_info *info;
|
||||
void write_PPM_header(FILE *file, struct image_info *info)
|
||||
{
|
||||
fprintf(file, "P6\n");
|
||||
fprintf(file, "%d %d\n", info->width, info->height);
|
||||
fprintf(file, "255\n");
|
||||
} /* end write_PPM_header */
|
||||
|
||||
int skip_line(file) FILE *file;
|
||||
int skip_line(FILE *file)
|
||||
{
|
||||
char *err;
|
||||
char buff[MAX_BUFF_SIZE];
|
||||
@ -309,8 +294,7 @@ int skip_line(file) FILE *file;
|
||||
return ((int)err);
|
||||
} /* end skip_line */
|
||||
|
||||
int read_available_line(file, buff) FILE *file;
|
||||
char *buff;
|
||||
int read_available_line(FILE *file, char *buff)
|
||||
{
|
||||
char *err;
|
||||
err = fgets(buff, MAX_BUFF_SIZE, file);
|
||||
|
||||
@ -28,7 +28,7 @@ typedef struct {
|
||||
colormap_t colormap;
|
||||
} RASTERFILE_INFO;
|
||||
|
||||
unsigned int open_rasterfile(filename) char *filename;
|
||||
unsigned int open_rasterfile(char *filename)
|
||||
{
|
||||
FILE *file;
|
||||
RASTERFILE_INFO *fileinfo;
|
||||
@ -55,7 +55,7 @@ unsigned int open_rasterfile(filename) char *filename;
|
||||
|
||||
} /* end open_rasterfile */
|
||||
|
||||
unsigned int create_rasterfile(filename) char *filename;
|
||||
unsigned int create_rasterfile(char *filename)
|
||||
{
|
||||
RASTERFILE_INFO *fileinfo;
|
||||
|
||||
@ -70,13 +70,13 @@ unsigned int create_rasterfile(filename) char *filename;
|
||||
|
||||
} /* end create_rasterfile */
|
||||
|
||||
close_rasterfile(fileinfo) RASTERFILE_INFO *fileinfo;
|
||||
close_rasterfile(RASTERFILE_INFO *fileinfo)
|
||||
{
|
||||
fclose(fileinfo->file);
|
||||
free((char *)fileinfo);
|
||||
} /* end close_rasterfile */
|
||||
|
||||
unsigned int read_rasterfile(fileinfo) RASTERFILE_INFO *fileinfo;
|
||||
unsigned int read_rasterfile(RASTERFILE_INFO *fileinfo)
|
||||
{
|
||||
Pixrect *pict;
|
||||
pict = pr_load_std_image(fileinfo->file, &(fileinfo->rh), &(fileinfo->colormap));
|
||||
@ -84,8 +84,7 @@ unsigned int read_rasterfile(fileinfo) RASTERFILE_INFO *fileinfo;
|
||||
|
||||
} /* end read_rasterfile */
|
||||
|
||||
int write_rasterfile(fileinfo, pix) RASTERFILE_INFO *fileinfo;
|
||||
Pixrect *pix;
|
||||
int write_rasterfile(RASTERFILE_INFO *fileinfo, Pixrect *pix)
|
||||
{
|
||||
int status;
|
||||
|
||||
@ -106,8 +105,7 @@ Pixrect *pix;
|
||||
return (FALSE);
|
||||
} /* end write_rasterfile */
|
||||
|
||||
int init_rasterfile_header(fileinfo, pix) RASTERFILE_INFO *fileinfo;
|
||||
Pixrect *pix;
|
||||
int init_rasterfile_header(RASTERFILE_INFO *fileinfo, Pixrect *pix)
|
||||
{
|
||||
Pixrect *ret_pix;
|
||||
int status;
|
||||
@ -133,8 +131,7 @@ Pixrect *pix;
|
||||
return (TRUE);
|
||||
} /* end init_rasterfile_header */
|
||||
|
||||
int position_rasterfile(fileinfo, n) RASTERFILE_INFO *fileinfo;
|
||||
int n;
|
||||
int position_rasterfile(RASTERFILE_INFO *fileinfo, int n)
|
||||
{
|
||||
long position;
|
||||
int status;
|
||||
|
||||
@ -90,8 +90,7 @@ static char *id = "$Id: inet.c,v 1.3 2001/12/24 01:09:03 sybalsky Exp $ Copyrigh
|
||||
extern u_int LispIOFds, LispReadFds;
|
||||
extern int *Lisp_errno;
|
||||
|
||||
LispPTR subr_TCP_ops(op, nameConn, proto, length, bufaddr, maxlen) int op;
|
||||
LispPTR nameConn, proto, length, bufaddr, maxlen;
|
||||
LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, LispPTR bufaddr, LispPTR maxlen)
|
||||
{
|
||||
#ifndef DOS
|
||||
int sock, len, buflen, res;
|
||||
|
||||
@ -279,7 +279,7 @@ void clear_display() {
|
||||
/* ================================================================ */
|
||||
/* Now takes 68k address, function renamed for safety */
|
||||
|
||||
void init_display2(display_addr, display_max) INT display_addr, display_max;
|
||||
void init_display2(INT display_addr, INT display_max)
|
||||
{
|
||||
int mmapstat;
|
||||
int fbgattr_result;
|
||||
@ -706,7 +706,7 @@ void flush_display_buffer() {
|
||||
#define BITEPER_DLBYTE 8
|
||||
#define DLBYTE_PERLINE (displaywidth / 8)
|
||||
|
||||
void flush_display_region(x, y, w, h) int x, y, w, h;
|
||||
void flush_display_region(int x, int y, int w, int h)
|
||||
{
|
||||
#ifdef SUNDISPLAY
|
||||
#ifdef DISPLAYBUFFER
|
||||
@ -723,7 +723,7 @@ void flush_display_region(x, y, w, h) int x, y, w, h;
|
||||
#endif /* DOS */
|
||||
}
|
||||
#ifdef BYTESWAP
|
||||
void byte_swapped_displayregion(x, y, w, h) int x, y, w, h;
|
||||
void byte_swapped_displayregion(int x, int y, int w, int h)
|
||||
{
|
||||
extern unsigned char reversedbits[];
|
||||
register unsigned int *longptr, *lineptr;
|
||||
@ -756,7 +756,7 @@ void byte_swapped_displayregion(x, y, w, h) int x, y, w, h;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void flush_display_lineregion(x, ybase, w, h) UNSIGNED x, ybase, w, h;
|
||||
void flush_display_lineregion(UNSIGNED x, UNSIGNED ybase, UNSIGNED w, UNSIGNED h)
|
||||
#ifdef I386
|
||||
{ /*flush_display_buffer(); */
|
||||
int y;
|
||||
@ -805,7 +805,7 @@ void flush_display_lineregion(x, ybase, w, h) UNSIGNED x, ybase, w, h;
|
||||
|
||||
#define BITSPERWORD 16
|
||||
|
||||
void flush_display_ptrregion(ybase, bitoffset, w, h) UNSIGNED bitoffset, ybase, w, h;
|
||||
void flush_display_ptrregion(UNSIGNED ybase, UNSIGNED bitoffset, UNSIGNED w, UNSIGNED h)
|
||||
#ifdef I386
|
||||
{ flush_display_buffer(); }
|
||||
#else
|
||||
|
||||
@ -377,7 +377,7 @@ u_char DOSLispKeyMap_101[0x80] = {
|
||||
void set_kbd_iopointers();
|
||||
void keyboardtype(int fd);
|
||||
|
||||
void init_keyboard(flg) int flg; /* if 0 init else re-init */
|
||||
void init_keyboard(int flg) /* if 0 init else re-init */
|
||||
{
|
||||
int keytrans;
|
||||
|
||||
@ -485,7 +485,7 @@ void set_kbd_iopointers() {
|
||||
/* ----------------------------------------------------------------*/
|
||||
|
||||
#ifdef SUNDISPLAY
|
||||
void seteventmask(eventmask) struct inputmask *eventmask;
|
||||
void seteventmask(struct inputmask *eventmask)
|
||||
{
|
||||
input_imnull(eventmask);
|
||||
eventmask->im_flags |= IM_ASCII | IM_NEGASCII | IM_NEGEVENT;
|
||||
@ -602,9 +602,7 @@ u_char *make_X_keymap() {
|
||||
return (table);
|
||||
}
|
||||
|
||||
int find_unused_key(map, minkey, len, syms, sym, table) KeySym *map;
|
||||
int minkey, len, syms, sym;
|
||||
u_char *table;
|
||||
int find_unused_key(KeySym *map, int minkey, int len, int syms, int sym, u_char *table)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -642,7 +640,7 @@ u_char *table;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void keyboardtype(fd) int fd;
|
||||
void keyboardtype(int fd)
|
||||
{
|
||||
int type;
|
||||
int i;
|
||||
|
||||
@ -68,7 +68,7 @@ extern int LispWindowFd, LispReadFds;
|
||||
|
||||
extern int errno;
|
||||
|
||||
void KB_enable(args) LispPTR *args; /* args[0] : ON/OFF flag
|
||||
void KB_enable(LispPTR *args) /* args[0] : ON/OFF flag
|
||||
* T -- ON
|
||||
* NIL -- OFF
|
||||
*/
|
||||
@ -115,7 +115,7 @@ extern int LispKbdFd;
|
||||
int bell_status_word;
|
||||
#endif /* DOS */
|
||||
|
||||
void KB_beep(args) LispPTR *args; /* args[0] : ON/OFF flag
|
||||
void KB_beep(LispPTR *args) /* args[0] : ON/OFF flag
|
||||
* T -- ON
|
||||
* NIL -- OFF
|
||||
* args[1] : frequency
|
||||
@ -169,7 +169,7 @@ void KB_beep(args) LispPTR *args; /* args[0] : ON/OFF flag
|
||||
*
|
||||
****************************************************/
|
||||
|
||||
void KB_setmp(args) LispPTR *args; /* args[0] : MPCODE */
|
||||
void KB_setmp(LispPTR *args) /* args[0] : MPCODE */
|
||||
{
|
||||
#ifdef DEBUG
|
||||
printf("MP: %d\n", args[0] & 0xffff);
|
||||
@ -188,7 +188,7 @@ void KB_setmp(args) LispPTR *args; /* args[0] : MPCODE */
|
||||
*
|
||||
****************************************************/
|
||||
|
||||
void KB_setled(args) LispPTR *args;
|
||||
void KB_setled(LispPTR *args)
|
||||
{
|
||||
#ifdef DOS
|
||||
outp(PORT_A, (unsigned char)0xED);
|
||||
|
||||
@ -67,8 +67,7 @@ char filetorun[30];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
main(argc, argv) int argc;
|
||||
char **argv;
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
char Earg[30], Ename[30], **newargv;
|
||||
int i;
|
||||
|
||||
@ -65,8 +65,7 @@ extern int displaywidth, displayheight, FrameBufferFd;
|
||||
*/
|
||||
/*******************************************************************/
|
||||
#ifdef COLOR
|
||||
cgfour_init_color_display(color_bitmapbase) /* SUBR 0210 */
|
||||
LispPTR color_bitmapbase; /* COLOR BITMAP ADDRESS */
|
||||
LispPTR cgfour_init_color_display(LispPTR color_bitmapbase) /* SUBR 0210 */ /* COLOR BITMAP ADDRESS */
|
||||
{
|
||||
struct pixrect *ColorFb;
|
||||
struct pixrect *color_source;
|
||||
@ -115,8 +114,7 @@ cgfour_init_color_display(color_bitmapbase) /* SUBR 0210 */
|
||||
|
||||
#else /* COLOR */
|
||||
|
||||
LispPTR cgfour_init_color_display(color_bitmapbase) /* SUBR 0210 */
|
||||
LispPTR color_bitmapbase; /* COLOR BITMAP ADDRESS */
|
||||
LispPTR cgfour_init_color_display(LispPTR color_bitmapbase) /* SUBR 0210 */ /* COLOR BITMAP ADDRESS */
|
||||
{
|
||||
printf("Color is not supported.\n");
|
||||
return (NIL);
|
||||
@ -132,7 +130,7 @@ LispPTR cgfour_init_color_display(color_bitmapbase) /* SUBR 0210 */
|
||||
*/
|
||||
/*******************************************************************/
|
||||
#ifdef COLOR
|
||||
LispPTR cgfour_change_screen_mode(which_screen) LispPTR which_screen;
|
||||
LispPTR cgfour_change_screen_mode(LispPTR which_screen)
|
||||
{ /* subr 0211 */
|
||||
struct pixrect *ColorFb;
|
||||
extern ScreenLocked;
|
||||
@ -207,7 +205,7 @@ LispPTR cgfour_change_screen_mode(which_screen) LispPTR which_screen;
|
||||
}
|
||||
#else /* COLOR */
|
||||
|
||||
LispPTR cgfour_change_screen_mode(which_screen) LispPTR which_screen;
|
||||
LispPTR cgfour_change_screen_mode(LispPTR which_screen)
|
||||
{
|
||||
printf("Color is not supported.\n");
|
||||
return (NIL);
|
||||
@ -229,7 +227,7 @@ unsigned char GRN_colormap;
|
||||
unsigned char BLU_colormap;
|
||||
|
||||
#ifdef COLOR
|
||||
LispPTR cgfour_set_colormap(args) LispPTR args[];
|
||||
LispPTR cgfour_set_colormap(LispPTR args[])
|
||||
{
|
||||
int index;
|
||||
struct pixrect *ColorFb;
|
||||
@ -249,7 +247,7 @@ LispPTR cgfour_set_colormap(args) LispPTR args[];
|
||||
}
|
||||
#else /* COLOR */
|
||||
|
||||
LispPTR cgfour_set_colormap(args) LispPTR args[];
|
||||
LispPTR cgfour_set_colormap(LispPTR args[])
|
||||
{
|
||||
printf("Color is not supported.\n");
|
||||
return (NIL);
|
||||
|
||||
@ -481,7 +481,7 @@ extern int Current_Hot_X, Current_Hot_Y;
|
||||
#endif /* XWINDOW */
|
||||
|
||||
extern struct cursor CurrentCursor;
|
||||
void flip_cursorbar(n) int n;
|
||||
void flip_cursorbar(int n)
|
||||
{
|
||||
GETWORD(EmCursorBitMap68K + n) = ~(GETWORD(EmCursorBitMap68K + n));
|
||||
#ifdef SUNDISPLAY
|
||||
|
||||
19
src/loader.c
19
src/loader.c
@ -46,7 +46,7 @@ char *malloc();
|
||||
C[length] = '\0'; \
|
||||
}
|
||||
|
||||
int dynamic_load_code(args) LispPTR *args;
|
||||
int dynamic_load_code(LispPTR *args)
|
||||
/* args[0]: LispPTR to file name.
|
||||
args[1]: native addr of where to load the code
|
||||
|
||||
@ -65,8 +65,7 @@ return_error:
|
||||
return (NIL_PTR);
|
||||
}
|
||||
|
||||
load_native_object(load_address, dynamic_file) unsigned load_address;
|
||||
char *dynamic_file;
|
||||
load_native_object(unsigned load_address, char *dynamic_file)
|
||||
{
|
||||
int load_length, entry_point;
|
||||
typedef char *charstrptr;
|
||||
@ -99,7 +98,7 @@ char *dynamic_file;
|
||||
|
||||
/* **** system call subr, living in sb_OLD_COMPILE_LOAD_NATIVE slot *** */
|
||||
|
||||
int do_system_call(arg) LispPTR arg;
|
||||
int do_system_call(LispPTR arg)
|
||||
{
|
||||
char cmd_str[512];
|
||||
register int result;
|
||||
@ -118,11 +117,8 @@ int do_system_call(arg) LispPTR arg;
|
||||
|
||||
/* ****** stuff below is old & should be removed when the subr is *** */
|
||||
|
||||
int dynamic_load(host_file, dynamic_file, load_address, needs_compile, needs_link,
|
||||
do_load) char *host_file,
|
||||
*dynamic_file;
|
||||
unsigned load_address, needs_compile, needs_link, do_load;
|
||||
|
||||
int dynamic_load(char *host_file, char *dynamic_file, unsigned load_address, unsigned needs_compile, unsigned needs_link,
|
||||
unsigned do_load)
|
||||
{
|
||||
int result = 0;
|
||||
char fnamec[80], fnameo[80], fnameil[80], cc_str[255], ld_str[255];
|
||||
@ -161,7 +157,7 @@ unsigned load_address, needs_compile, needs_link, do_load;
|
||||
|
||||
} /*dynamic_load */
|
||||
|
||||
exec_command(cmd_str) char *cmd_str;
|
||||
int exec_command(char *cmd_str)
|
||||
{
|
||||
typedef char *charstrptr;
|
||||
typedef charstrptr charstrlist[21];
|
||||
@ -176,8 +172,7 @@ exec_command(cmd_str) char *cmd_str;
|
||||
|
||||
} /*exec_command */
|
||||
|
||||
load_object(load_address, dynamic_file) unsigned load_address;
|
||||
char *dynamic_file;
|
||||
int load_object(unsigned load_address, char *dynamic_file)
|
||||
{
|
||||
int load_length, entry_point;
|
||||
typedef char *charstrptr;
|
||||
|
||||
@ -151,7 +151,7 @@ LispPTR LCinit(void) {
|
||||
so the loop is unnecessary. */
|
||||
/* * * NOT USED * * */
|
||||
#ifdef NEVER
|
||||
int LCTypeOf(thing, typename) register LispPTR thing, typename;
|
||||
int LCTypeOf(LispPTR thing, LispPTR typename)
|
||||
{
|
||||
register struct dtd *dtd68k;
|
||||
#ifdef BIGVM
|
||||
|
||||
10
src/lpdual.c
10
src/lpdual.c
@ -24,11 +24,7 @@ static char *id = "$Id: lpdual.c,v 1.2 1999/01/03 02:07:17 sybalsky Exp $ Copyri
|
||||
#pragma global assoc
|
||||
#endif
|
||||
|
||||
#ifdef OS4
|
||||
rowdual(rownr) int *rownr;
|
||||
#else
|
||||
void rowdual(int *rownr)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
double f, g, minrhs;
|
||||
@ -62,13 +58,7 @@ void rowdual(int *rownr)
|
||||
}
|
||||
} /* rowdual */
|
||||
|
||||
#ifdef OS4
|
||||
short coldual(numeta, rownr, colnr, minit, prow, drow) int *numeta, *rownr, *colnr;
|
||||
short *minit;
|
||||
double *prow, *drow;
|
||||
#else
|
||||
short coldual(int *numeta, int *rownr, int *colnr, short *minit, double *prow, double *drow)
|
||||
#endif
|
||||
{
|
||||
int i, j, r, varnr;
|
||||
double theta, quot, pivot, d, f, g;
|
||||
|
||||
@ -228,13 +228,8 @@ int lpmain(LispPTR lispresults) {
|
||||
|
||||
} /* main */
|
||||
|
||||
#ifdef OS4
|
||||
int lpsetup(rows, cols, nonnuls, rhs, relns, cend, mat, ints, lowbo, upbo, objbound) int rows, cols,
|
||||
nonnuls, rhs, relns, cend, mat, ints, lowbo, upbo, objbound;
|
||||
#else
|
||||
int lpsetup(int rows, int cols, int nonnuls, int rhs, int relns, int cend, int mat, int ints,
|
||||
int lowbo, int upbo, int objbound)
|
||||
#endif /* OS4 */
|
||||
{
|
||||
double obj_bound = -Infinite;
|
||||
int failure, i, autoscale;
|
||||
|
||||
11
src/lpread.c
11
src/lpread.c
@ -55,19 +55,8 @@ extern REAL Infinite;
|
||||
* and free the intermediate structure
|
||||
*/
|
||||
|
||||
#ifdef OS4
|
||||
readlispinput(lp, lisprhs, lisprelns, lispcend, lispmat, lispints, lisplowbo, lispupbo) lprec *lp;
|
||||
float *lisprhs;
|
||||
short *lisprelns;
|
||||
int *lispcend;
|
||||
lispmr *lispmat;
|
||||
short *lispints;
|
||||
float *lisplowbo;
|
||||
float *lispupbo;
|
||||
#else
|
||||
void readlispinput(lprec *lp, float *lisprhs, short *lisprelns, int *lispcend, lispmr *lispmat,
|
||||
short *lispints, float *lisplowbo, float *lispupbo)
|
||||
#endif /* OS4 */
|
||||
{
|
||||
int i, j, k, index, nn_ind;
|
||||
int x;
|
||||
|
||||
10
src/lptran.c
10
src/lptran.c
@ -24,12 +24,7 @@ static char *id = "$Id: lptran.c,v 1.2 1999/01/03 02:07:20 sybalsky Exp $ Copyri
|
||||
#pragma global assoc
|
||||
#endif
|
||||
|
||||
#ifdef OS4
|
||||
ftran(start, end, pcol) int start, end;
|
||||
double *pcol;
|
||||
#else
|
||||
void ftran(int start, int end, double *pcol)
|
||||
#endif
|
||||
{
|
||||
int i, j;
|
||||
int k, r;
|
||||
@ -59,12 +54,7 @@ void ftran(int start, int end, double *pcol)
|
||||
if (abs(pcol[i]) < EPSEL) pcol[i] = 0;
|
||||
} /* ftran */
|
||||
|
||||
#ifdef OS4
|
||||
btran(numc, row) int numc;
|
||||
double *row;
|
||||
#else
|
||||
void btran(int numc, double *row)
|
||||
#endif
|
||||
{
|
||||
int i, j, k;
|
||||
double f;
|
||||
|
||||
@ -18,21 +18,11 @@ static char *id = "$Id: lpwrite.c,v 1.2 1999/01/03 02:07:20 sybalsky Exp $ Copyr
|
||||
|
||||
#include "lpdefs.h"
|
||||
#include "lpglobl.h"
|
||||
#ifdef OS4
|
||||
#include <sys/types.h>
|
||||
#include <varargs.h>
|
||||
#else
|
||||
#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
/* this is the ansi version ... */
|
||||
|
||||
#ifdef OS4
|
||||
print_solution(stream, sol) FILE *stream;
|
||||
double *sol;
|
||||
#else
|
||||
void print_solution(FILE *stream, double *sol)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -50,11 +40,7 @@ void print_solution(FILE *stream, double *sol)
|
||||
}
|
||||
} /* print_solution */
|
||||
|
||||
#ifdef OS4
|
||||
print_indent()
|
||||
#else
|
||||
void print_indent(void)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -63,11 +49,7 @@ void print_indent(void)
|
||||
fprintf(stderr, "> ");
|
||||
} /* print_indent */
|
||||
|
||||
#ifdef OS4
|
||||
debug_print_solution(sol) double *sol;
|
||||
#else
|
||||
void debug_print_solution(double *sol)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -78,11 +60,7 @@ void debug_print_solution(double *sol)
|
||||
}
|
||||
} /* debug_print_solution */
|
||||
|
||||
#ifdef OS4
|
||||
debug_print_bounds(upbo, lowbo) double *upbo, *lowbo;
|
||||
#else
|
||||
void debug_print_bounds(double *upbo, double *lowbo)
|
||||
#endif
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -99,10 +77,6 @@ void debug_print_bounds(double *upbo, double *lowbo)
|
||||
}
|
||||
} /* debug_print_bounds */
|
||||
|
||||
#ifdef OS4
|
||||
debug_print(format) char *format;
|
||||
{ return 0; }
|
||||
#else
|
||||
void debug_print(char *format, ...) {
|
||||
va_list ap;
|
||||
|
||||
@ -114,5 +88,3 @@ void debug_print(char *format, ...) {
|
||||
va_end(ap);
|
||||
}
|
||||
} /* debug_print */
|
||||
|
||||
#endif
|
||||
|
||||
@ -42,6 +42,7 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
|
||||
#endif /* USE_DLPI */
|
||||
#endif /* NOETHER */
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef SYSVONLY
|
||||
#ifndef DOS
|
||||
#include <strings.h>
|
||||
@ -71,6 +72,7 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
|
||||
|
||||
#if defined(MACOSX) || defined(FREEBSD)
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
@ -337,8 +339,7 @@ void print_info_lines();
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int main(argc, argv) int argc;
|
||||
char **argv;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i;
|
||||
char *envname;
|
||||
@ -690,8 +691,7 @@ void start_lisp() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int makepathname(src, dst) register char *src;
|
||||
register char *dst;
|
||||
int makepathname(char *src, char *dst)
|
||||
{
|
||||
register int len;
|
||||
register char *base, *cp;
|
||||
|
||||
@ -61,8 +61,7 @@ extern int LispWindowFd;
|
||||
extern int ScreenLocked;
|
||||
|
||||
/*** N_OP_misc7 -- pseudocolor or fbitmapbit ***/
|
||||
LispPTR N_OP_misc7(arg1, arg2, arg3, arg4, arg5, arg6, arg7, alpha) int alpha;
|
||||
register LispPTR arg1, arg2, arg3, arg4, arg5, arg6, arg7;
|
||||
LispPTR N_OP_misc7(LispPTR arg1, LispPTR arg2, LispPTR arg3, LispPTR arg4, LispPTR arg5, LispPTR arg6, LispPTR arg7, int alpha)
|
||||
{
|
||||
DLword *base;
|
||||
int x, y, operation, heightminus1, rasterwidth, oldbit;
|
||||
|
||||
@ -163,9 +163,7 @@ LispPTR compare_chars(register char *char1, register char *char2, register DLwor
|
||||
|
||||
} /* end compare_chars */
|
||||
#ifdef BYTESWAP
|
||||
int bytecmp(char1, char2, len) char *char1;
|
||||
char *char2;
|
||||
int len;
|
||||
int bytecmp(char *char1, char *char2, int len)
|
||||
{
|
||||
int index;
|
||||
for (index = 0; index < len; index++) {
|
||||
|
||||
@ -69,8 +69,7 @@ LispPTR *MNWBUFFERING68k = 0;
|
||||
/* at the head of the chain. (This is bubblesort) */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
WindowInterface Find_window(dspif, Xwindow) DspInterface dspif;
|
||||
Window Xwindow;
|
||||
WindowInterface Find_window(DspInterface dspif, Window Xwindow)
|
||||
{
|
||||
WindowInterface curr, prev;
|
||||
|
||||
@ -143,10 +142,7 @@ SignalMNWEvent() {
|
||||
}
|
||||
}
|
||||
|
||||
void HandleMotion(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XMotionEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleMotion(Widget widget, WindowInterface wif, XMotionEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
MNWPointerMotionEvent *mevent;
|
||||
|
||||
@ -163,20 +159,14 @@ Boolean *continue_to_dispatch;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleButton(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XButtonEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleButton(Widget widget, WindowInterface wif, XButtonEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
MNWButtonEvent *mevent;
|
||||
|
||||
lisp_Xbutton(xevent, 0);
|
||||
}
|
||||
|
||||
void HandleKey(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XKeyEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleKey(Widget widget, WindowInterface wif, XKeyEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
lisp_Xkeyboard(xevent, 0);
|
||||
|
||||
@ -195,10 +185,7 @@ Boolean *continue_to_dispatch;
|
||||
#endif /* NEVER */
|
||||
}
|
||||
|
||||
void HandleCrossing(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XCrossingEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleCrossing(Widget widget, WindowInterface wif, XCrossingEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
switch (xevent->type) {
|
||||
case EnterNotify:
|
||||
@ -212,10 +199,7 @@ Boolean *continue_to_dispatch;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleBackgroundCrossing(widget, dspif, xevent, continue_to_dispatch) Widget widget;
|
||||
DspInterface dspif;
|
||||
XCrossingEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleBackgroundCrossing(Widget widget, DspInterface dspif, XCrossingEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
switch (xevent->type) {
|
||||
case EnterNotify: DoMNWRing(MNWMouseIn, dspif->screen, 0, 0, 0, 0, 0); break;
|
||||
@ -226,10 +210,7 @@ Boolean *continue_to_dispatch;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleFocus(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XFocusChangeEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleFocus(Widget widget, WindowInterface wif, XFocusChangeEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
MNWFocusEvent *mevent;
|
||||
/*
|
||||
@ -243,10 +224,7 @@ Boolean *continue_to_dispatch;
|
||||
*/
|
||||
}
|
||||
|
||||
void HandleStructure(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XAnyEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleStructure(Widget widget, WindowInterface wif, XAnyEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
LispPTR screen, MWindow;
|
||||
Window window;
|
||||
@ -326,10 +304,7 @@ Boolean *continue_to_dispatch;
|
||||
}
|
||||
}
|
||||
|
||||
void HandleBackgroundButton(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
LispPTR wif;
|
||||
XButtonEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleBackgroundButton(Widget widget, LispPTR wif, XButtonEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
MNWButtonEvent *mevent;
|
||||
|
||||
@ -361,28 +336,20 @@ Boolean *continue_to_dispatch;
|
||||
}
|
||||
|
||||
/* Handle expose events on the frame widget -- print the title */
|
||||
void HandleTitle(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XExposeEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleTitle(Widget widget, WindowInterface wif, XExposeEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
if (xevent->y <= 12)
|
||||
showtitle(wif->MedleyWindow, ((MedleyWindow)Cptr(wif->MedleyWindow))->WTITLE);
|
||||
}
|
||||
|
||||
/* Handle expose events on the frame widget -- print the title */
|
||||
void HandleExpose(widget, wif, xevent, continue_to_dispatch) Widget widget;
|
||||
WindowInterface wif;
|
||||
XExposeEvent *xevent;
|
||||
Boolean *continue_to_dispatch;
|
||||
void HandleExpose(Widget widget, WindowInterface wif, XExposeEvent *xevent, Boolean *continue_to_dispatch)
|
||||
{
|
||||
XCopyPlane(wif->dspif->handle, wif->backing, XtWindow(wif->windowwidget), wif->ReplaceGC,
|
||||
xevent->x, xevent->y, xevent->width, xevent->height, xevent->x, xevent->y, 1);
|
||||
}
|
||||
|
||||
void SignalVJmpScroll(widget, wif, percent_ptr) Widget widget;
|
||||
WindowInterface wif;
|
||||
XtPointer percent_ptr; /* This is a *float */
|
||||
void SignalVJmpScroll(Widget widget, WindowInterface wif, XtPointer percent_ptr /* This is a *float */)
|
||||
{
|
||||
MNWJumpScrollReqEvent *event;
|
||||
|
||||
@ -396,9 +363,7 @@ XtPointer percent_ptr; /* This is a *float */
|
||||
}
|
||||
}
|
||||
|
||||
void SignalHJmpScroll(widget, wif, percent_ptr) Widget widget;
|
||||
WindowInterface wif;
|
||||
XtPointer percent_ptr; /* This is a *float */
|
||||
void SignalHJmpScroll(Widget widget, WindowInterface wif, XtPointer percent_ptr)
|
||||
{
|
||||
MNWJumpScrollReqEvent *event;
|
||||
|
||||
@ -412,9 +377,7 @@ XtPointer percent_ptr; /* This is a *float */
|
||||
}
|
||||
}
|
||||
|
||||
void SignalVScroll(widget, wif, position) Widget widget;
|
||||
WindowInterface wif;
|
||||
int position;
|
||||
void SignalVScroll(Widget widget, WindowInterface wif, int position)
|
||||
{
|
||||
MNWScrollReqEvent *event;
|
||||
|
||||
@ -428,9 +391,7 @@ int position;
|
||||
}
|
||||
}
|
||||
|
||||
void SignalHScroll(widget, wif, position) Widget widget;
|
||||
WindowInterface wif;
|
||||
int position;
|
||||
void SignalHScroll(Widget widget, WindowInterface wif, int position)
|
||||
{
|
||||
MNWScrollReqEvent *event;
|
||||
|
||||
@ -451,7 +412,7 @@ int position;
|
||||
/* */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
getMNWsignaldata(fd) int fd;
|
||||
void getMNWsignaldata(int fd)
|
||||
{
|
||||
Display *display;
|
||||
DspInterfaceRec *dspif;
|
||||
@ -567,9 +528,7 @@ getMNWsignaldata(fd) int fd;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
DoMNWRing(type, screen, window, l, b, wid, h) int type;
|
||||
LispPTR screen, window;
|
||||
int l, b, wid, h;
|
||||
void DoMNWRing(int type, LispPTR screen, LispPTR window, int l, int b, int wid, int h)
|
||||
{
|
||||
DLword w, r;
|
||||
MNWEvent *event;
|
||||
|
||||
127
src/mnxmeth.c
127
src/mnxmeth.c
@ -74,8 +74,7 @@ extern DLword REPLACE_atom;
|
||||
/* Xerrhandler. */
|
||||
/* Utility function to make URaid the error handler for X. */
|
||||
/**************************************************************/
|
||||
int Xerrhandler(display, event) Display *display;
|
||||
XErrorEvent *event;
|
||||
int Xerrhandler(Display *display, XErrorEvent *event)
|
||||
{
|
||||
char msg[80];
|
||||
|
||||
@ -83,7 +82,7 @@ XErrorEvent *event;
|
||||
error(msg);
|
||||
}
|
||||
|
||||
intersectregions(reg1, reg2, result) MRegion *reg1, *reg2, *result;
|
||||
void intersectregions(MRegion *reg1, MRegion *reg2, MRegion *result)
|
||||
{
|
||||
result->x = max(reg1->x, reg2->x);
|
||||
result->y = max(reg1->y, reg2->y);
|
||||
@ -96,7 +95,7 @@ intersectregions(reg1, reg2, result) MRegion *reg1, *reg2, *result;
|
||||
/* Utility function to calculate the white border of a window.*/
|
||||
/* Takes a medley window as its argument. */
|
||||
/**************************************************************/
|
||||
int getwhiteborder(medleywindow) LispPTR medleywindow;
|
||||
int getwhiteborder(LispPTR medleywindow)
|
||||
{
|
||||
int border;
|
||||
|
||||
@ -118,7 +117,7 @@ int getwhiteborder(medleywindow) LispPTR medleywindow;
|
||||
/* Utility function to calculate the black border of a window.*/
|
||||
/* Takes a medley window as its argument. */
|
||||
/**************************************************************/
|
||||
int getblackborder(medleywindow) LispPTR medleywindow;
|
||||
int getblackborder(LispPTR medleywindow)
|
||||
{
|
||||
int border;
|
||||
|
||||
@ -143,7 +142,7 @@ int getblackborder(medleywindow) LispPTR medleywindow;
|
||||
/* Takes a medley window as its argument. Returns a pointer to*/
|
||||
/* a malloc'd c string or NULL if no string is present. */
|
||||
/**************************************************************/
|
||||
char *gettitlestring(medleywin) LispPTR medleywin;
|
||||
char *gettitlestring(LispPTR medleywin)
|
||||
{
|
||||
char *titlestring;
|
||||
int strlen;
|
||||
@ -163,7 +162,7 @@ char *gettitlestring(medleywin) LispPTR medleywin;
|
||||
/* Return the height of the title bar for this window. */
|
||||
/* Pick the value from the TITLEDS of the screen. */
|
||||
/**************************************************************/
|
||||
int gettitleheight(medleywin) LispPTR medleywin;
|
||||
int gettitleheight(LispPTR medleywin)
|
||||
{
|
||||
if (((MedleyWindow)Cptr(medleywin))->WTITLE == NIL)
|
||||
return (0);
|
||||
@ -179,11 +178,8 @@ int gettitleheight(medleywin) LispPTR medleywin;
|
||||
/* This function attempts to syncronize the line data in lisp */
|
||||
/* and X. */
|
||||
/**************************************************************/
|
||||
void setlineattributes(display, dspif, wif, dd, mwidth, mdash) Display *display;
|
||||
DspInterface dspif;
|
||||
WindowInterface wif;
|
||||
DISPLAYDATA *dd;
|
||||
LispPTR mwidth, mdash;
|
||||
void setlineattributes(Display *display, DspInterface dspif, WindowInterface wif, DISPLAYDATA *dd,
|
||||
LispPTR mwidth, LispPTR mdash)
|
||||
{
|
||||
int l, lw, ls;
|
||||
unsigned char *dash_list;
|
||||
@ -230,7 +226,7 @@ LispPTR mwidth, mdash;
|
||||
}
|
||||
}
|
||||
|
||||
settileorigin(medleywin, x, y) LispPTR medleywin, x, y;
|
||||
void settileorigin(LispPTR medleywin, LispPTR x, LispPTR y)
|
||||
{
|
||||
WindowInterface wif;
|
||||
Display *display;
|
||||
@ -252,9 +248,7 @@ settileorigin(medleywin, x, y) LispPTR medleywin, x, y;
|
||||
|
||||
/**************************************************************/
|
||||
/**************************************************************/
|
||||
calculateshape(wif, x, y, width, height, topwidoffset, tophgtoffset) WindowInterface wif;
|
||||
LispPTR x, y, width, height;
|
||||
int topwidoffset, tophgtoffset;
|
||||
void calculateshape(WindowInterface wif, LispPTR x, LispPTR y, LispPTR width, LispPTR height, int topwidoffset, int tophgtoffset)
|
||||
{
|
||||
wif->windowreg.width = LispIntToCInt(width);
|
||||
wif->windowreg.height = LispIntToCInt(height);
|
||||
@ -268,8 +262,7 @@ int topwidoffset, tophgtoffset;
|
||||
/* layout the regions. All calculations based on the outer */
|
||||
/* region. The rest of the widget moves around this region. */
|
||||
/**************************************************************/
|
||||
calcwif(wif, xoff, yoff) WindowInterface wif;
|
||||
int xoff, yoff;
|
||||
void calcwif(WindowInterface wif, int xoff, int yoff)
|
||||
{
|
||||
int whiteborder, blackborder, blackborder2, titleheight, border;
|
||||
|
||||
@ -309,7 +302,7 @@ int xoff, yoff;
|
||||
|
||||
/**************************************************************/
|
||||
/**************************************************************/
|
||||
refreshwindow(medleywin) LispPTR medleywin;
|
||||
void refreshwindow(LispPTR medleywin)
|
||||
{
|
||||
WindowInterface wif;
|
||||
DISPLAYDATA *dd;
|
||||
@ -342,12 +335,10 @@ refreshwindow(medleywin) LispPTR medleywin;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int translate_x(wif, xval) int xval;
|
||||
WindowInterface wif;
|
||||
int translate_x(WindowInterface wif, int xval)
|
||||
{ return (xval + (wif->xoffset - wif->windowreg.x - (wif->blackborder2 >> 1) - wif->whiteborder)); }
|
||||
|
||||
int translate_y(wif, yval) int yval;
|
||||
WindowInterface wif;
|
||||
int translate_y(WindowInterface wif, int yval)
|
||||
{ return (yval + wif->yoffset - (wif->windowreg.y + (wif->blackborder2 >> 1) + wif->whiteborder)); }
|
||||
|
||||
extern void SignalVJmpScroll();
|
||||
@ -671,7 +662,7 @@ int srcx, srcy, dstx, dsty, width, height, op;
|
||||
#endif /* Never */
|
||||
}
|
||||
|
||||
MNXBBTToXWindow(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXBBTToXWindow(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to src BITMAP */
|
||||
/* args[2] = scr_x */
|
||||
/* args[3] = scr_y */
|
||||
@ -706,7 +697,7 @@ MNXBBTToXWindow(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
XFlush(display);
|
||||
}
|
||||
|
||||
MNXBBTFromXWindow(args) LispArgs args; /* args[0] = LispPTR to src WINDOW */
|
||||
MNXBBTFromXWindow(LispArgs args) /* args[0] = LispPTR to src WINDOW */
|
||||
/* args[1] = scr_x */
|
||||
/* args[2] = scr_y */
|
||||
/* args[3] = LispPTR to dst BITMAP */
|
||||
@ -749,7 +740,7 @@ MNXBBTFromXWindow(args) LispArgs args; /* args[0] = LispPTR to src WINDOW */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXBBTWinWin(args) LispArgs args; /* args[0] = LispPTR to src WINDOW */
|
||||
MNXBBTWinWin(LispArgs args) /* args[0] = LispPTR to src WINDOW */
|
||||
/* args[1] = scr_x */
|
||||
/* args[2] = scr_y */
|
||||
/* args[3] = LispPTR to dst WINDOW */
|
||||
@ -826,7 +817,7 @@ MNXBBTWinWin(args) LispArgs args; /* args[0] = LispPTR to src WINDOW */
|
||||
/* contrary to Medleys own window system. If you do tricks with the */
|
||||
/* SAVE field of the window, reconsider your evil ways. */
|
||||
/************************************************************************/
|
||||
MNXcloseW(args) LispArgs args;
|
||||
MNXcloseW(LispArgs args)
|
||||
{
|
||||
Display *display;
|
||||
WindowInterface wif;
|
||||
@ -930,7 +921,7 @@ MedleyWindow medleyw;
|
||||
medleyw->NativeIf = 0;
|
||||
}
|
||||
|
||||
MNXdestroyW(args) LispArgs args;
|
||||
MNXdestroyW(LispArgs args)
|
||||
{
|
||||
/* Medley interface to destroyw */
|
||||
destroyw(DspIfFromMw(args[0]), WIfFromMw(args[0]), Cptr(args[0]));
|
||||
@ -945,7 +936,7 @@ MNXdestroyW(args) LispArgs args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
MNXdestroyDisplay(args) LispArgs args; /* args[0] = LispPTR to MedleyScreen */
|
||||
MNXdestroyDisplay(LispArgs args) /* args[0] = LispPTR to MedleyScreen */
|
||||
{
|
||||
DspInterface dspif;
|
||||
WindowInterface i;
|
||||
@ -974,7 +965,7 @@ MNXdestroyDisplay(args) LispArgs args; /* args[0] = LispPTR to MedleyScreen */
|
||||
}
|
||||
}
|
||||
|
||||
MNXmoveW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXmoveW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = left */
|
||||
/* args[2] = bottom */
|
||||
/* args[3] = non-NIL => skip actually moving it */
|
||||
@ -1006,7 +997,7 @@ MNXmoveW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXshapeW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXshapeW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = left */
|
||||
/* args[2] = bottom */
|
||||
/* args[3] = width */
|
||||
@ -1043,7 +1034,7 @@ MNXshapeW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXtotopW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXtotopW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
{
|
||||
Display *dsp;
|
||||
WindowInterface wif;
|
||||
@ -1057,7 +1048,7 @@ MNXtotopW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXburyW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXburyW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
{
|
||||
Display *dsp;
|
||||
WindowInterface wif;
|
||||
@ -1071,7 +1062,7 @@ MNXburyW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXshrinkW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXshrinkW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to icon MedleyWindow. */
|
||||
/* args[2] = Iconwindow x */
|
||||
/* args[3] = Iconwindow y */
|
||||
@ -1105,7 +1096,7 @@ MNXshrinkW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXexpandW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXexpandW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
{
|
||||
DspInterface dspif;
|
||||
WindowInterface wif;
|
||||
@ -1125,7 +1116,7 @@ MNXexpandW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXcreateW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXcreateW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = left */
|
||||
/* args[2] = bottom */
|
||||
/* args[3] = width */
|
||||
@ -1347,7 +1338,7 @@ showtitle(win) LispPTR win;
|
||||
/* slot on the MedWindow */
|
||||
/* NOTE! we don't get whiteframe, blackframe or the title. See MNXcloseW. */
|
||||
/************************************************************************/
|
||||
MNXopenW(args) LispArgs args;
|
||||
MNXopenW(LispArgs args)
|
||||
{
|
||||
Display *display;
|
||||
WindowInterface wif;
|
||||
@ -1420,7 +1411,7 @@ MNXopenW(args) LispArgs args;
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXresetW(args) LispArgs args;
|
||||
MNXresetW(LispArgs args)
|
||||
{
|
||||
Display *display;
|
||||
WindowInterface wif;
|
||||
@ -1445,7 +1436,7 @@ MNXresetW(args) LispArgs args;
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXSetOffsets(args) LispArgs args; /* args[0] = window XOFFSET/YOFFSET changed in */
|
||||
MNXSetOffsets(LispArgs args) /* args[0] = window XOFFSET/YOFFSET changed in */
|
||||
/* args[1] = new XOFFSET */
|
||||
/* args[2] = new YOFFSET */
|
||||
{
|
||||
@ -1461,7 +1452,7 @@ MNXSetOffsets(args) LispArgs args; /* args[0] = window XOFFSET/YOFFSET changed i
|
||||
/* Imageop Methods. */
|
||||
/*********************/
|
||||
|
||||
MNXdrawpoint(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawpoint(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = x */
|
||||
/* args[2] = y */
|
||||
/* args[3] = brush */
|
||||
@ -1520,7 +1511,7 @@ MNXdrawpoint(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* Remember that this method has an OPERATION arument in Lisp */
|
||||
/* so we have to fix that there. */
|
||||
/**************************************************************/
|
||||
MNXdrawline(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawline(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = x1 */
|
||||
/* args[2] = y1 */
|
||||
/* args[3] = x2 */
|
||||
@ -1576,7 +1567,7 @@ MNXdrawline(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* It is assumed that the BRUSH argument is a fixp that */
|
||||
/* represents a ROUND brush. */
|
||||
/**************************************************************/
|
||||
MNXdrawcircle(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawcircle(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = centerX */
|
||||
/* args[2] = centerY */
|
||||
/* args[3] = radius */
|
||||
@ -1630,7 +1621,7 @@ MNXdrawcircle(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* It is assumed that the BRUSH argument is a fixp that */
|
||||
/* represents a ROUND brush. */
|
||||
/**************************************************************/
|
||||
MNXdrawarc(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawarc(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = centerX */
|
||||
/* args[2] = centerY */
|
||||
/* args[3] = radius */
|
||||
@ -1691,7 +1682,7 @@ MNXdrawarc(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* It is assumed that the BRUSH argument is a fixp that */
|
||||
/* represents a ROUND brush. */
|
||||
/**************************************************************/
|
||||
MNXdrawelipse(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawelipse(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = centerX */
|
||||
/* args[2] = centerY */
|
||||
/* args[3] = semiminorradius */
|
||||
@ -1748,7 +1739,7 @@ MNXdrawelipse(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* MNXfillcircle */
|
||||
/* Note: 23040 is 360 * 64 sixtyfourth degrees */
|
||||
/**************************************************************/
|
||||
MNXfillcircle(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXfillcircle(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = centerX */
|
||||
/* args[2] = centerY */
|
||||
/* args[3] = radius */
|
||||
@ -1798,7 +1789,7 @@ MNXfillcircle(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/**************************************************************/
|
||||
/* MNXwritepixel */
|
||||
/**************************************************************/
|
||||
MNXwritepixel(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXwritepixel(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = x */
|
||||
/* args[2] = y */
|
||||
{
|
||||
@ -1847,7 +1838,7 @@ MNXwritepixel(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* is organized as [x1,y1,x2,y2,...] MNXdrawpolygon smashes this*/
|
||||
/* vector with the integer values converted to C integers. */
|
||||
/**************************************************************/
|
||||
MNXdrawpolygon(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawpolygon(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to Pointvector */
|
||||
/* args[2] = Closedp */
|
||||
{
|
||||
@ -1910,7 +1901,7 @@ MNXdrawpolygon(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
return (NIL); /* Report that all is ok. */
|
||||
}
|
||||
|
||||
MNXfillpolygon(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXfillpolygon(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to Pointvector */
|
||||
/* args[2] = Closedp */
|
||||
{
|
||||
@ -1981,7 +1972,7 @@ MNXfillpolygon(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* is organized as [x1,y1,x2,y2,...] MNXdrawpolygon smashes this*/
|
||||
/* vector with the integer values converted to C integers. */
|
||||
/**************************************************************/
|
||||
MNXdrawcurve(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdrawcurve(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to Pointvector */
|
||||
/* args[2] = Closedp */
|
||||
{
|
||||
@ -2048,7 +2039,7 @@ MNXdrawcurve(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/************************************************************/
|
||||
/* MNXclippingregion */
|
||||
/************************************************************/
|
||||
MNXclippingregion(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXclippingregion(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = left */
|
||||
/* args[2] = bottom */
|
||||
/* args[3] = width */
|
||||
@ -2075,7 +2066,7 @@ MNXclippingregion(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* Thus have to call this function explicitly twice. Once to */
|
||||
/* set the new state and once to put the old state back. */
|
||||
/**************************************************************/
|
||||
MNXoperation(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXoperation(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = Smallp for function. */
|
||||
{
|
||||
WindowInterface wif;
|
||||
@ -2111,7 +2102,7 @@ MNXoperation(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* */
|
||||
/* */
|
||||
/**************************************************************/
|
||||
MNXdspcolor(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdspcolor(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to FIXP or BITMAPP */
|
||||
{
|
||||
WindowInterface wif;
|
||||
@ -2186,7 +2177,7 @@ MNXdspcolor(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/* */
|
||||
/* */
|
||||
/**************************************************************/
|
||||
MNXdspbackcolor(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXdspbackcolor(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = background type 0=fixp for color 1=bitmap for stiple. */
|
||||
/* args[2] = background, fixp or bitmap */
|
||||
{ settexture(args[0]); }
|
||||
@ -2197,7 +2188,7 @@ MNXdspbackcolor(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
/************************************************************/
|
||||
MNXBitBltBW() { error("Call to MNXBitBltBW. This function is not in use anymore."); }
|
||||
|
||||
MNXbltshadeBW(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXbltshadeBW(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = LispPTR to TEXTURE */
|
||||
/* args[2] = dst_x */
|
||||
/* args[3] = dst_y */
|
||||
@ -2334,7 +2325,7 @@ DspInterface dspif;
|
||||
XFlush(display);
|
||||
}
|
||||
|
||||
XClearToEOL(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
XClearToEOL(LispArgs args) /* args[0] = MedleyWindow */
|
||||
{
|
||||
Display *display;
|
||||
Window window;
|
||||
@ -2358,7 +2349,7 @@ XClearToEOL(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
XFlush(display);
|
||||
}
|
||||
|
||||
MNXNewPage(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
MNXNewPage(LispArgs args) /* args[0] = MedleyWindow */
|
||||
{
|
||||
Display *display;
|
||||
Window window;
|
||||
@ -2374,7 +2365,7 @@ MNXNewPage(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
/* NOTE this function returns NIL if we succeed and T if we */
|
||||
/* bump into the right margin. */
|
||||
/************************************************************/
|
||||
MNXOutchar(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
MNXOutchar(LispArgs args) /* args[0] = MedleyWindow */
|
||||
/* args[1] = Charcode */
|
||||
/* args[2] = Stream */
|
||||
/* args[3] = DD */
|
||||
@ -2460,10 +2451,10 @@ MNXOutchar(args) LispArgs args; /* args[0] = MedleyWindow */
|
||||
/************************************************************/
|
||||
/* The WINDOWPROP interface */
|
||||
/************************************************************/
|
||||
MNXgetwindowprop(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXgetwindowprop(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
{}
|
||||
|
||||
MNXputwindowprop(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXputwindowprop(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
/* args[1] = Lispint to despatch on. */
|
||||
/* args[n] = args for the method. */
|
||||
{
|
||||
@ -2530,7 +2521,7 @@ static Cursor grab_cursor = 0; /* Cursor in effect while pointer is grabbed */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
MNXGrabPointer(args) LispArgs args;
|
||||
MNXGrabPointer(LispArgs args)
|
||||
/* args[0] = medley screen */
|
||||
/* args[1] = cursor to use, or NIL */
|
||||
{
|
||||
@ -2576,7 +2567,7 @@ MNXGrabPointer(args) LispArgs args;
|
||||
return (NIL);
|
||||
}
|
||||
|
||||
MNXUngrabPointer(args) LispArgs args;
|
||||
MNXUngrabPointer(LispArgs args)
|
||||
{
|
||||
Display *display;
|
||||
WindowInterface wif;
|
||||
@ -2604,7 +2595,7 @@ MNXUngrabPointer(args) LispArgs args;
|
||||
|
||||
static int box_drawn = 0; /* T if there's a box on already */
|
||||
|
||||
MNXDrawBox(args) LispArgs args; /* args[0] = Medley SCREEN to draw box on */
|
||||
MNXDrawBox(LispArgs args) /* args[0] = Medley SCREEN to draw box on */
|
||||
/* args[1] = Left of box */
|
||||
/* args[2] = bottom of box */
|
||||
/* args[3] = width of box */
|
||||
@ -2653,7 +2644,7 @@ MNXDrawBox(args) LispArgs args; /* args[0] = Medley SCREEN to draw box on */
|
||||
}
|
||||
}
|
||||
|
||||
MNXMovePointer(args) LispArgs args; /* args[0] = LispPTR to SCREEN */
|
||||
MNXMovePointer(LispArgs args) /* args[0] = LispPTR to SCREEN */
|
||||
/* args[1] = new pointer X */
|
||||
/* args[2] = new pointer Y */
|
||||
{
|
||||
@ -2675,10 +2666,10 @@ MNXMovePointer(args) LispArgs args; /* args[0] = LispPTR to SCREEN */
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
MNXmouseconfirm(args) LispArgs args; /* args[0] = LispPTR to MedleyWindow */
|
||||
MNXmouseconfirm(LispArgs args) /* args[0] = LispPTR to MedleyWindow */
|
||||
{ /* Use a DIALOG WIDGET here. */ }
|
||||
|
||||
MNXgarb(args) LispArgs args; /* args[0] = LispPTR to MedleyScreen */
|
||||
MNXgarb(LispArgs args) /* args[0] = LispPTR to MedleyScreen */
|
||||
/* args[1] = NIL for GC off, non-NIL for GC on */
|
||||
{
|
||||
DspInterface dspif;
|
||||
@ -2693,7 +2684,7 @@ MNXgarb(args) LispArgs args; /* args[0] = LispPTR to MedleyScreen */
|
||||
DefaultGCOfScreen(XtScreen(dspif->gcindicator)), 0, 0, 8, 8);
|
||||
}
|
||||
|
||||
MNXMakePromptWindow(args) LispArgs args; /* args[0] = Lisp window, the prompt window */
|
||||
MNXMakePromptWindow(LispArgs args) /* args[0] = Lisp window, the prompt window */
|
||||
{
|
||||
Widget form, menu;
|
||||
DspInterface dspif;
|
||||
@ -2737,7 +2728,7 @@ MNXMakePromptWindow(args) LispArgs args; /* args[0] = Lisp window, the prompt wi
|
||||
|
||||
static Cursor MNX_cursor = NULL; /* Cursor in active use */
|
||||
|
||||
MNXSetCursor(args) LispArgs args; /* args[0] = Medley screen */
|
||||
MNXSetCursor(LispArgs args) /* args[0] = Medley screen */
|
||||
/* args[1] = bits for new cursor */
|
||||
/* args[2] = hot-spot x */
|
||||
/* args[3] = hot-spot y */
|
||||
@ -2785,7 +2776,7 @@ MNXSetCursor(args) LispArgs args; /* args[0] = Medley screen */
|
||||
/* The slots for identifier, object type and window system */
|
||||
/* has to be filled in. */
|
||||
/************************************************************/
|
||||
InitDsp(args) LispArgs args; /* arg[0] = LispPTR to MedleyScreen */
|
||||
InitDsp(LispArgs args) /* arg[0] = LispPTR to MedleyScreen */
|
||||
{
|
||||
DspInterface dspif;
|
||||
MedleyScreen SCREEN;
|
||||
|
||||
@ -66,7 +66,7 @@ int probemouse() {
|
||||
}
|
||||
}
|
||||
|
||||
make_mouse_instance(mouse) MouseInterface mouse;
|
||||
void make_mouse_instance(MouseInterface mouse)
|
||||
{
|
||||
#ifdef DOS
|
||||
|
||||
|
||||
@ -135,7 +135,7 @@ static LispPTR ocr_get_read_result();
|
||||
* unwind protected contour to reset OCR.
|
||||
*/
|
||||
|
||||
int ocr_comm(args) LispPTR *args;
|
||||
int ocr_comm(LispPTR *args)
|
||||
{
|
||||
int com;
|
||||
LispPTR val;
|
||||
|
||||
@ -98,7 +98,7 @@ static void ocr_proc_post_read();
|
||||
* notify the completion of the initial request.
|
||||
*/
|
||||
|
||||
void ocr_proc(ppid) pid_t ppid;
|
||||
void ocr_proc(pid_t ppid)
|
||||
{
|
||||
int len, postponed = 0;
|
||||
u_char pkt[PKTLEN];
|
||||
@ -159,8 +159,7 @@ static void ocr_proc_exit() {
|
||||
* Handle the work requested from the primary emulator process
|
||||
*/
|
||||
|
||||
static int ocr_handle_comm(pkt, epkt, reasonp) u_char pkt[], epkt[];
|
||||
int *reasonp;
|
||||
static int ocr_handle_comm(u_char pkt[], u_char epkt[], int *reasonp)
|
||||
{
|
||||
int len;
|
||||
|
||||
@ -256,8 +255,7 @@ int *reasonp;
|
||||
* Handle postponed time consuming work.
|
||||
*/
|
||||
|
||||
static void ocr_do_postponed_work(reason, ppid) int reason;
|
||||
pid_t ppid;
|
||||
static void ocr_do_postponed_work(int reason, pid_t ppid)
|
||||
{
|
||||
u_char pkt[PKTLEN];
|
||||
|
||||
@ -307,7 +305,7 @@ pid_t ppid;
|
||||
* Notify primary emulator process that time consuming work has been done.
|
||||
*/
|
||||
|
||||
static void notify_ready(ppid) pid_t ppid;
|
||||
static void notify_ready(pid_t ppid)
|
||||
{ kill(ppid, SIGUSR1); }
|
||||
|
||||
/*
|
||||
@ -365,7 +363,7 @@ static void ocr_init_signal() {
|
||||
* Scan image
|
||||
*/
|
||||
|
||||
static int ocr_proc_scan(spp) struct ocr_scan_para *spp;
|
||||
static int ocr_proc_scan(struct ocr_scan_para *spp)
|
||||
{
|
||||
struct scan_params sp;
|
||||
|
||||
@ -471,8 +469,7 @@ static int ocr_proc_scan(spp) struct ocr_scan_para *spp;
|
||||
* image being uploaded into the ocr_image_infor structure.
|
||||
*/
|
||||
|
||||
static int ocr_proc_iminfo(upp, infop) struct ocr_up_para *upp;
|
||||
struct ocr_image_info *infop;
|
||||
static int ocr_proc_iminfo(struct ocr_up_para *upp, struct ocr_image_info *infop)
|
||||
{
|
||||
struct img_params upara;
|
||||
struct ocr_stat st;
|
||||
@ -538,8 +535,7 @@ struct ocr_image_info *infop;
|
||||
* Set Read Parameters
|
||||
*/
|
||||
|
||||
static int ocr_proc_set_rpara(rpp, len) register struct ocr_read_para *rpp;
|
||||
int len;
|
||||
static int ocr_proc_set_rpara(register struct ocr_read_para *rpp, int len)
|
||||
{
|
||||
register int cnt = len;
|
||||
struct read_params rpara;
|
||||
@ -634,8 +630,7 @@ static int ocr_proc_read() {
|
||||
* compatible with ocr_bulk_read in 'ocr.c'.
|
||||
*/
|
||||
|
||||
static void ocr_proc_img_upload(iminfop, ppid) struct ocr_image_info *iminfop;
|
||||
pid_t ppid;
|
||||
static void ocr_proc_img_upload(struct ocr_image_info *iminfop, pid_t ppid)
|
||||
{
|
||||
register int len, resid, firsttime = 1;
|
||||
int cnt;
|
||||
@ -678,7 +673,7 @@ pid_t ppid;
|
||||
* compatible with ocr_bulk_read in 'ocr.c'.
|
||||
*/
|
||||
|
||||
static void ocr_proc_post_read(ppid) pid_t ppid;
|
||||
static void ocr_proc_post_read(pid_t ppid)
|
||||
{
|
||||
static u_char rbuf[65536];
|
||||
static u_char fbuf[65536];
|
||||
@ -747,8 +742,7 @@ fail : {
|
||||
* Reformat the read data to make a life of Lisp tremendously easy
|
||||
*/
|
||||
|
||||
static int ocr_conv_read_data(sp, dp, len) register u_char *sp, *dp;
|
||||
register int len;
|
||||
static int ocr_conv_read_data(register u_char *sp, u_char *dp, register int len)
|
||||
{
|
||||
bcopy(sp, dp, len);
|
||||
return (len);
|
||||
@ -788,10 +782,7 @@ register int len;
|
||||
|
||||
|
||||
static int
|
||||
ocr_conv_read_data(sp, dp, len, statep)
|
||||
register u_char *sp, *dp;
|
||||
register int len;
|
||||
struct parse_state *statep;
|
||||
ocr_conv_read_data(u_char *sp, u_char *dp, int len, struct parse_state *statep)
|
||||
{
|
||||
/+
|
||||
* for now...
|
||||
|
||||
33
src/oether.c
33
src/oether.c
@ -135,7 +135,7 @@ static struct nit_ioc nioc;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ether_suspend(args) LispPTR args[];
|
||||
LispPTR ether_suspend(LispPTR args[])
|
||||
{
|
||||
#ifndef NOETHER
|
||||
#ifdef OS4
|
||||
@ -170,7 +170,7 @@ ether_suspend(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ether_resume(args) LispPTR args[];
|
||||
LispPTR ether_resume(LispPTR args[])
|
||||
{
|
||||
if (ether_fd == -1) return (NIL);
|
||||
#ifndef NOETHER
|
||||
@ -200,7 +200,7 @@ ether_resume(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ether_ctrlr(args) LispPTR args[];
|
||||
LispPTR ether_ctrlr(LispPTR args[])
|
||||
{
|
||||
if (ether_fd < 0) return (NIL);
|
||||
return (ATOM_T);
|
||||
@ -210,7 +210,7 @@ ether_ctrlr(args) LispPTR args[];
|
||||
* ether_reset(args) 175/73/0
|
||||
* reset ether controller and disable receipt of packets
|
||||
**********************************************************************/
|
||||
ether_reset(args) LispPTR args[];
|
||||
LispPTR ether_reset(LispPTR args[])
|
||||
{
|
||||
int i;
|
||||
char hostnumber[6];
|
||||
@ -241,7 +241,7 @@ ether_reset(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ether_get(args) LispPTR args[];
|
||||
LispPTR ether_get(LispPTR args[])
|
||||
{
|
||||
LispPTR MaxByteCount;
|
||||
LispPTR result = NIL;
|
||||
@ -271,7 +271,7 @@ ether_get(args) LispPTR args[];
|
||||
**********************************************************************/
|
||||
#define OFFSET sizeof(sa.sa_data)
|
||||
|
||||
ether_send(args) LispPTR args[];
|
||||
LispPTR ether_send(LispPTR args[])
|
||||
{
|
||||
#ifndef NOETHER
|
||||
/*
|
||||
@ -327,7 +327,7 @@ ether_send(args) LispPTR args[];
|
||||
* check whether a packet has come. if does, notify iocb
|
||||
**********************************************************************/
|
||||
|
||||
ether_setfilter(args) LispPTR args[];
|
||||
LispPTR ether_setfilter(LispPTR args[])
|
||||
{ return (NIL); } /* ether_setfilter */
|
||||
|
||||
/**********************************************************************
|
||||
@ -361,7 +361,7 @@ static struct timeval EtherTimeout = {0, 0};
|
||||
static int nitpos = 0, nitlen = 0; /* for NIT read buffer in OS3 */
|
||||
#endif
|
||||
|
||||
check_ether() {
|
||||
LispPTR check_ether() {
|
||||
/*
|
||||
* If receiver active then check if any packets are
|
||||
* available from the ethernet. If so, read the packet
|
||||
@ -476,7 +476,7 @@ check_ether() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
get_packet() {
|
||||
LispPTR get_packet() {
|
||||
#ifndef NOETHER
|
||||
#ifndef OS4
|
||||
static int rfds;
|
||||
@ -563,7 +563,7 @@ get_packet() {
|
||||
* This is believed obsolete with packet filtering enabled
|
||||
**********************************************************************/
|
||||
|
||||
check_filter(buffer) u_char *buffer;
|
||||
int check_filter(u_char *buffer)
|
||||
{
|
||||
/* broadcast packets */
|
||||
if (ether_addr_equal(buffer, broadcast)) switch (((short *)buffer)[6]) {
|
||||
@ -586,10 +586,7 @@ check_filter(buffer) u_char *buffer;
|
||||
* Also believed obsolete
|
||||
**********************************************************************/
|
||||
|
||||
ether_addr_equal(add1, add2)
|
||||
|
||||
u_char add1[],
|
||||
add2[];
|
||||
int ether_addr_equal(u_char add1[], u_char add2[])
|
||||
{
|
||||
register int i;
|
||||
for (i = 0; i < 6; i++)
|
||||
@ -601,7 +598,7 @@ ether_addr_equal(add1, add2)
|
||||
* init_uid()
|
||||
* sets effective user-id to real user-id
|
||||
**********************************************************************/
|
||||
init_uid() {
|
||||
void init_uid() {
|
||||
#ifndef NOETHER
|
||||
int rid;
|
||||
rid = getuid();
|
||||
@ -617,7 +614,7 @@ init_uid() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
init_ifpage_ether() {
|
||||
void init_ifpage_ether() {
|
||||
InterfacePage->nshost0 = (DLword)((ether_host[0] << 8) + ether_host[1]);
|
||||
InterfacePage->nshost1 = (DLword)((ether_host[2] << 8) + ether_host[3]);
|
||||
InterfacePage->nshost2 = (DLword)((ether_host[4] << 8) + ether_host[5]);
|
||||
@ -635,7 +632,7 @@ struct sockaddr_nit snit;
|
||||
/* open nit socket, called from main before starting BCE. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
init_ether() {
|
||||
void init_ether() {
|
||||
#ifndef NOETHER
|
||||
|
||||
/* JRB - This code will have to be a bit different for SUN 4.0; the probable
|
||||
@ -882,7 +879,7 @@ if (ether_fd >= 0) {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
check_sum(args) register LispPTR *args;
|
||||
LispPTR check_sum(LispPTR *args)
|
||||
{
|
||||
register LispPTR checksum;
|
||||
register DLword *address;
|
||||
|
||||
@ -17,9 +17,8 @@ static char *id = "$Id: oldeether.c,v 1.2 1999/01/03 02:07:28 sybalsky Exp $ Cop
|
||||
#include "version.h"
|
||||
|
||||
#ifdef NOETHER
|
||||
main(argc, argv, argp) int argc;
|
||||
char **argv, **argp;
|
||||
{}
|
||||
int main(int argc, char *argv[])
|
||||
{return (0);}
|
||||
#else
|
||||
|
||||
#include <stdio.h>
|
||||
@ -51,8 +50,7 @@ int ether_fd = -1; /* file descriptor for ether s
|
||||
unsigned char ether_host[6] = {0, 0, 0, 0, 0, 0}; /* 48 bit address */
|
||||
char filetorun[30] = "lde";
|
||||
|
||||
main(argc, argv, envp) int argc;
|
||||
char **argv, **envp;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char Earg[30], Ename[30], **newargv;
|
||||
int i;
|
||||
|
||||
@ -264,7 +264,7 @@ LispPTR mess_readp() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR mess_read(args) LispPTR *args;
|
||||
LispPTR mess_read(LispPTR *args)
|
||||
/* args[0] buffer */
|
||||
{
|
||||
#if defined(DOS) || defined(XWINDOW)
|
||||
|
||||
105
src/picture.c
105
src/picture.c
@ -13,6 +13,9 @@ static char *id = "$Id: picture.c,v 1.2 1999/01/03 02:07:30 sybalsky Exp $ Copyr
|
||||
/* parties without the specific permission of Venue. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
/* 2017-06-22, NBriggs -- changed return (T) to return (ATOM_T) for functions
|
||||
* that should be returning a LispPTR result
|
||||
*/
|
||||
|
||||
#include "version.h"
|
||||
|
||||
@ -122,38 +125,7 @@ extern DLword REPLACE_atom, INVERT_atom, PAINT_atom, ERASE_atom;
|
||||
extern int Video_OnOff_Flg;
|
||||
#endif /* VIDEO */
|
||||
|
||||
LispPTR Picture_Op(args) LispPTR *args;
|
||||
{
|
||||
int op;
|
||||
LispPTR ret_value;
|
||||
|
||||
op = (DLword)args[0];
|
||||
|
||||
switch (op) {
|
||||
case PICT_CREATE: ret_value = (LispPTR)Picture_Create(args); break;
|
||||
case PICT_FREE: ret_value = Picture_Free(args); break;
|
||||
case PICT_GETVALUE: ret_value = Picture_GetValue(args); break;
|
||||
case PICT_SETVALUE: ret_value = Picture_SetValue(args); break;
|
||||
case PICT_GET: ret_value = Picture_Get(args); break;
|
||||
case PICT_PUT: ret_value = Picture_Put(args); break;
|
||||
case PICT_BITBLT: ret_value = Picture_Bitblt(args); break;
|
||||
case PICT_BLTSHADE: ret_value = Picture_Bltshade(args); break;
|
||||
case VIDEOFILE_OPEN: ret_value = VideoFile_Open(args); break;
|
||||
case VIDEOFILE_CLOSE: ret_value = VideoFile_Close(args); break;
|
||||
case VIDEOFILE_READ: ret_value = VideoFile_Read(args); break;
|
||||
case VIDEOFILE_WRITE: ret_value = VideoFile_Write(args); break;
|
||||
case VIDEOFILE_POSITION:
|
||||
ret_value = VideoFile_Position(args);
|
||||
break;
|
||||
defaults:
|
||||
ret_value = NIL;
|
||||
break;
|
||||
} /* end switch( op ) */
|
||||
|
||||
return (ret_value);
|
||||
}
|
||||
|
||||
int Picture_Create(args) LispPTR *args;
|
||||
LispPTR Picture_Create(LispPTR *args)
|
||||
{
|
||||
int width, height, bitsperpixel;
|
||||
Pixrect *storage;
|
||||
@ -164,7 +136,7 @@ int Picture_Create(args) LispPTR *args;
|
||||
bitsperpixel = (DLword)args[3];
|
||||
|
||||
if ((bitsperpixel != 1) && (bitsperpixel != 8) && (bitsperpixel != 24)) {
|
||||
return (NULL);
|
||||
return (NIL);
|
||||
} /* end if( bitsperpixel ) */
|
||||
|
||||
if (bitsperpixel == 24) bitsperpixel = 32;
|
||||
@ -186,7 +158,7 @@ int Picture_Create(args) LispPTR *args;
|
||||
|
||||
extern Pixrect *TrueColorFb;
|
||||
|
||||
int Picture_Free(args) LispPTR *args;
|
||||
LispPTR Picture_Free(LispPTR *args)
|
||||
{
|
||||
LispPicture *n_picture;
|
||||
Pixrect *pict;
|
||||
@ -200,10 +172,10 @@ int Picture_Free(args) LispPTR *args;
|
||||
n_picture->storage = NULL;
|
||||
} /* end if( pict ) */
|
||||
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
} /* end Picture_Free */
|
||||
|
||||
int Picture_GetValue(args) LispPTR *args;
|
||||
LispPTR Picture_GetValue(LispPTR *args)
|
||||
{
|
||||
LispPTR picture;
|
||||
int x, y, value;
|
||||
@ -224,7 +196,7 @@ int Picture_GetValue(args) LispPTR *args;
|
||||
|
||||
} /* end Picture_GetValue */
|
||||
|
||||
int Picture_SetValue(args) LispPTR *args;
|
||||
LispPTR Picture_SetValue(LispPTR *args)
|
||||
{
|
||||
int x, y, value;
|
||||
LispPicture *n_picture;
|
||||
@ -237,7 +209,7 @@ int Picture_SetValue(args) LispPTR *args;
|
||||
|
||||
pict = (Pixrect *)n_picture->storage;
|
||||
pr_put(pict, x, y, value);
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
|
||||
bad_arg:
|
||||
return (NIL);
|
||||
@ -247,7 +219,7 @@ bad_arg:
|
||||
#define MAX_NAME_LEN 512
|
||||
static char file_name[MAX_NAME_LEN];
|
||||
|
||||
int Picture_Get(args) LispPTR *args;
|
||||
LispPTR Picture_Get(LispPTR *args)
|
||||
{
|
||||
LispPicture *n_picture;
|
||||
int length;
|
||||
@ -260,13 +232,13 @@ int Picture_Get(args) LispPTR *args;
|
||||
n_picture->height = (DLword)(((Pixrect *)n_picture->storage)->pr_height);
|
||||
n_picture->bitsperpixel = (DLword)(((Pixrect *)n_picture->storage)->pr_depth);
|
||||
if (n_picture->bitsperpixel == 32) n_picture->bitsperpixel = 24;
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
} else {
|
||||
return (NIL);
|
||||
} /* end if */
|
||||
} /* end Picture_Get */
|
||||
|
||||
int Picture_Put(args) LispPTR *args;
|
||||
LispPTR Picture_Put(LispPTR *args)
|
||||
{
|
||||
LispPicture *n_picture;
|
||||
char *name;
|
||||
@ -277,10 +249,10 @@ int Picture_Put(args) LispPTR *args;
|
||||
|
||||
Pixrect_to_File((Pixrect *)n_picture->storage, file_name);
|
||||
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
} /*end Picture_Put */
|
||||
|
||||
Picture_Bitblt(args) LispPTR *args;
|
||||
LispPTR Picture_Bitblt(LispPTR *args)
|
||||
{
|
||||
LispPicture *src, *dst;
|
||||
int src_left, src_bottom, dst_left, dst_bottom, top, bottom, left, right, width, height, stodx,
|
||||
@ -392,7 +364,7 @@ bad_arg:
|
||||
|
||||
} /* end Picture_Bitblt */
|
||||
|
||||
Picture_Bltshade(args) LispPTR *args;
|
||||
LispPTR Picture_Bltshade(LispPTR *args)
|
||||
{
|
||||
LispPicture *dst;
|
||||
unsigned int texture;
|
||||
@ -491,7 +463,7 @@ bad_arg:
|
||||
#define OPEN_FOR_READ 0
|
||||
#define OPEN_FOR_WRITE 1
|
||||
|
||||
VideoFile_Open(args) LispPTR *args;
|
||||
LispPTR VideoFile_Open(LispPTR *args)
|
||||
{
|
||||
unsigned int *cell, videofile;
|
||||
int length, access;
|
||||
@ -510,19 +482,19 @@ VideoFile_Open(args) LispPTR *args;
|
||||
return (LADDR_from_68k(cell));
|
||||
} /* end VideoFile_Open */
|
||||
|
||||
int VideoFile_Close(args) LispPTR *args;
|
||||
LispPTR VideoFile_Close(LispPTR *args)
|
||||
{
|
||||
unsigned int videofile;
|
||||
|
||||
N_GETNUMBER(args[1], videofile, bad_arg);
|
||||
|
||||
close_rasterfile(videofile);
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
bad_arg:
|
||||
return (NIL);
|
||||
} /* end VideoFile_Close */
|
||||
|
||||
int VideoFile_Read(args) LispPTR *args;
|
||||
LispPTR VideoFile_Read(LispPTR *args)
|
||||
{
|
||||
LispPicture *n_picture;
|
||||
unsigned int *cell, pix, videofile;
|
||||
@ -536,14 +508,14 @@ int VideoFile_Read(args) LispPTR *args;
|
||||
n_picture->bitsperpixel = (DLword)(((Pixrect *)n_picture->storage)->pr_depth);
|
||||
if (n_picture->bitsperpixel == 32) n_picture->bitsperpixel = 24;
|
||||
|
||||
return (T); /* normal return */
|
||||
return (ATOM_T); /* normal return */
|
||||
} /* end if */
|
||||
|
||||
bad_arg:
|
||||
return (NIL);
|
||||
} /* end VideoFile_Read */
|
||||
|
||||
int VideoFile_Write(args) LispPTR *args;
|
||||
LispPTR VideoFile_Write(LispPTR *args)
|
||||
{
|
||||
unsigned int videofile;
|
||||
LispPicture *n_pict;
|
||||
@ -553,13 +525,13 @@ int VideoFile_Write(args) LispPTR *args;
|
||||
n_pict = (LispPicture *)Addr68k_from_LADDR(args[2]);
|
||||
|
||||
if ((status = write_rasterfile(videofile, (Pixrect *)n_pict->storage))) {
|
||||
return (T);
|
||||
return (ATOM_T);
|
||||
} /* end if( status ) */
|
||||
bad_arg:
|
||||
return (NIL);
|
||||
} /* end VideoFile_Write */
|
||||
|
||||
int VideoFile_Position(args) LispPTR *args;
|
||||
LispPTR VideoFile_Position(LispPTR *args)
|
||||
{
|
||||
unsigned int videofile;
|
||||
int n, status;
|
||||
@ -572,3 +544,32 @@ bad_arg:
|
||||
return (NIL);
|
||||
|
||||
} /* end VideoFile_Position */
|
||||
|
||||
LispPTR Picture_Op(LispPTR *args)
|
||||
{
|
||||
int op;
|
||||
LispPTR ret_value;
|
||||
|
||||
op = (DLword)args[0];
|
||||
|
||||
switch (op) {
|
||||
case PICT_CREATE: ret_value = (LispPTR)Picture_Create(args); break;
|
||||
case PICT_FREE: ret_value = Picture_Free(args); break;
|
||||
case PICT_GETVALUE: ret_value = Picture_GetValue(args); break;
|
||||
case PICT_SETVALUE: ret_value = Picture_SetValue(args); break;
|
||||
case PICT_GET: ret_value = Picture_Get(args); break;
|
||||
case PICT_PUT: ret_value = Picture_Put(args); break;
|
||||
case PICT_BITBLT: ret_value = Picture_Bitblt(args); break;
|
||||
case PICT_BLTSHADE: ret_value = Picture_Bltshade(args); break;
|
||||
case VIDEOFILE_OPEN: ret_value = VideoFile_Open(args); break;
|
||||
case VIDEOFILE_CLOSE: ret_value = VideoFile_Close(args); break;
|
||||
case VIDEOFILE_READ: ret_value = VideoFile_Read(args); break;
|
||||
case VIDEOFILE_WRITE: ret_value = VideoFile_Write(args); break;
|
||||
case VIDEOFILE_POSITION: ret_value = VideoFile_Position(args); break;
|
||||
defaults:
|
||||
ret_value = NIL;
|
||||
break;
|
||||
} /* end switch( op ) */
|
||||
|
||||
return (ret_value);
|
||||
}
|
||||
|
||||
@ -129,7 +129,7 @@ LispPTR COLORSCREEN_index; /* if it's 0xffffffff, not yet initialized */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
C_slowbltchar(args) register LispPTR *args;
|
||||
C_slowbltchar(LispPTR *args)
|
||||
{
|
||||
Stream *n_dstream;
|
||||
DISPLAYDATA *n_dd;
|
||||
@ -301,15 +301,8 @@ C_slowbltchar(args) register LispPTR *args;
|
||||
|
||||
u_int ColorizedFont8CACHE[MAXFONTHEIGHT / BITSPERNIBBLE * MAXFONTWIDTH / BITSPERNIBBLE];
|
||||
|
||||
ColorizeFont8(sBM, sXOffset, sYOffset, dBM, dXOffset, dYOffset, width, height, col0, col1,
|
||||
sourcetype, operation) register BITMAP *sBM;
|
||||
register DLword sXOffset, sYOffset, width, height;
|
||||
register BITMAP *dBM;
|
||||
DLword dYOffset, dXOffset;
|
||||
u_char col0, col1;
|
||||
LispPTR sourcetype;
|
||||
LispPTR operation;
|
||||
|
||||
void ColorizeFont8(BITMAP *sBM, DLword sXOffset, DLword sYOffset, BITMAP *dBM, DLword dXOffset, DLword dYOffset, DLword width, DLword height, u_char col0, u_char col1,
|
||||
LispPTR sourcetype, LispPTR operation)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -338,15 +331,8 @@ LispPTR operation;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
ColorizeFont8_BIGBM(sBM, sXOffset, sYOffset, dBM, dXOffset, dYOffset, width, height, col0, col1,
|
||||
sourcetype, operation) register BITMAP *sBM;
|
||||
register DLword sXOffset, sYOffset, width, height;
|
||||
register BIGBM *dBM;
|
||||
DLword dXOffset, dYOffset;
|
||||
u_char col0, col1;
|
||||
LispPTR sourcetype;
|
||||
LispPTR operation;
|
||||
|
||||
void ColorizeFont8_BIGBM(BITMAP *sBM, DLword sXOffset, DLword sYOffset, BIGBM *dBM, DLword dXOffset, DLword dYOffset, DLword width, DLword height, u_char col0, u_char col1,
|
||||
LispPTR sourcetype, LispPTR operation)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -422,9 +408,7 @@ loop:
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
newColorizeFont8(pbt, backcolor, forecolor, srctype, ope) PILOTBBT *pbt;
|
||||
u_char backcolor, forecolor;
|
||||
LispPTR srctype, ope;
|
||||
void newColorizeFont8(PILOTBBT *pbt, u_char backcolor, u_char forecolor, LispPTR srctype, LispPTR ope)
|
||||
{
|
||||
register DLword *nbase;
|
||||
register u_char *dbase;
|
||||
@ -447,7 +431,7 @@ LispPTR srctype, ope;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Uncolorize_Bitmap(args) LispPTR args[];
|
||||
void Uncolorize_Bitmap(LispPTR args[])
|
||||
{
|
||||
BITMAP *s_bitmap, *d_bitmap;
|
||||
register DLword *OnOff;
|
||||
@ -497,7 +481,7 @@ Uncolorize_Bitmap(args) LispPTR args[];
|
||||
case 15:
|
||||
word |= 0x1;
|
||||
break;
|
||||
defualts:
|
||||
defaults:
|
||||
break;
|
||||
} /* end switch( x ) */
|
||||
} /* end if( ) */
|
||||
@ -525,7 +509,7 @@ Uncolorize_Bitmap(args) LispPTR args[];
|
||||
|
||||
extern DLword INPUT_atom, REPLACE_atom;
|
||||
|
||||
Colorize_Bitmap(args) LispPTR args[];
|
||||
LispPTR Colorize_Bitmap(LispPTR args[])
|
||||
{
|
||||
BITMAP *s_bitmap, *d_bitmap;
|
||||
int s_left, s_bottom, d_left, d_bottom, width, height, color0, color1, d_nbits;
|
||||
@ -602,7 +586,7 @@ bad_arg:
|
||||
} \
|
||||
}
|
||||
|
||||
Draw_8BppColorLine(args) register LispPTR *args;
|
||||
void Draw_8BppColorLine(LispPTR *args)
|
||||
{
|
||||
extern DLword REPLACE_atom, INVERT_atom, PAINT_atom, ERASE_atom;
|
||||
extern int ScreenLocked;
|
||||
|
||||
@ -54,7 +54,7 @@ static char *id = "$Id: rawrs232c.c,v 1.2 1999/01/03 02:07:31 sybalsky Exp $ Cop
|
||||
*/
|
||||
/************************************************************/
|
||||
|
||||
raw_rs232c_open(portname) LispPTR portname;
|
||||
LispPTR raw_rs232c_open(LispPTR portname)
|
||||
{
|
||||
ONED_ARRAY *head;
|
||||
|
||||
@ -74,8 +74,7 @@ raw_rs232c_open(portname) LispPTR portname;
|
||||
|
||||
} /* raw_rs232c_open */
|
||||
|
||||
raw_rs232c_setparams(fd, data) LispPTR fd;
|
||||
LispPTR data;
|
||||
LispPTR raw_rs232c_setparams(LispPTR fd, LispPTR data)
|
||||
{
|
||||
RawRSParam *ndata;
|
||||
struct termios termdata;
|
||||
@ -238,7 +237,7 @@ LispPTR data;
|
||||
|
||||
} /* raw_rs232c_setparams */
|
||||
|
||||
raw_rs232c_close(fd) LispPTR fd;
|
||||
LispPTR raw_rs232c_close(LispPTR fd)
|
||||
{
|
||||
if (close(0xffff & fd) < 0) {
|
||||
perror("RS close : ");
|
||||
@ -247,9 +246,7 @@ raw_rs232c_close(fd) LispPTR fd;
|
||||
return (ATOM_T);
|
||||
}
|
||||
|
||||
raw_rs232c_write(fd, baseptr, len) LispPTR fd;
|
||||
LispPTR baseptr;
|
||||
LispPTR len;
|
||||
LispPTR raw_rs232c_write(LispPTR fd, LispPTR baseptr, LispPTR len)
|
||||
{
|
||||
unsigned char *ptr;
|
||||
|
||||
@ -264,10 +261,7 @@ LispPTR len;
|
||||
|
||||
/* Assume numbers are SMALLPOSP */
|
||||
struct timeval RS_TimeOut = {0, 0};
|
||||
raw_rs232c_read(fd, buff, nbytes) LispPTR fd;
|
||||
LispPTR buff;
|
||||
LispPTR nbytes;
|
||||
|
||||
LispPTR raw_rs232c_read(LispPTR fd, LispPTR buff, LispPTR nbytes)
|
||||
{
|
||||
unsigned char *buffptr;
|
||||
int length;
|
||||
@ -294,8 +288,7 @@ LispPTR nbytes;
|
||||
|
||||
} /* raw_rs232c_read */
|
||||
|
||||
raw_rs232c_setint(fd, onoff) LispPTR fd;
|
||||
LispPTR onoff;
|
||||
LispPTR raw_rs232c_setint(LispPTR fd, LispPTR onoff)
|
||||
{
|
||||
extern u_int LispReadFds;
|
||||
extern u_int LispIOFds;
|
||||
|
||||
@ -53,7 +53,7 @@ static char *id = "$Id: rpc.c,v 1.3 2001/12/24 01:09:06 sybalsky Exp $ Copyright
|
||||
#define ToMem memcpy
|
||||
#endif /* OS5 */
|
||||
|
||||
LispPTR rpc(args) LispPTR *args;
|
||||
LispPTR rpc(LispPTR *args)
|
||||
{
|
||||
#ifndef DOS
|
||||
/* Arguments are:
|
||||
|
||||
34
src/rs232c.c
34
src/rs232c.c
@ -67,19 +67,19 @@ rs_restore_hup_handler() { sigvec(SIGHUP, &prev_hup_sv, (struct sigvec *)NULL);
|
||||
/*
|
||||
* Fatal Error, enter URAID
|
||||
*/
|
||||
rs_error(msg) char *msg;
|
||||
void rs_error(char *msg)
|
||||
{ error(msg); }
|
||||
|
||||
/*
|
||||
* Continuable Error
|
||||
*/
|
||||
rs_cerror(msg) char *msg;
|
||||
void rs_cerror(char *msg)
|
||||
{ printf(msg); }
|
||||
|
||||
/*
|
||||
* Invoked at boot time
|
||||
*/
|
||||
rs232c_init() {
|
||||
void rs232c_init() {
|
||||
RS232C_Dev = "/dev/ttyb"; /*Modify for target system */
|
||||
RS232C_Fd = -1;
|
||||
|
||||
@ -106,7 +106,7 @@ rs232c_init() {
|
||||
* Default set up for the RS232C file descriptor
|
||||
* The value of the other parameters not listed below can be changed by user.
|
||||
*/
|
||||
rs232_fd_init(fd) register int fd;
|
||||
int rs232_fd_init(int fd)
|
||||
{
|
||||
struct termios tio;
|
||||
|
||||
@ -373,7 +373,7 @@ rs232c_getstatus() {
|
||||
}
|
||||
}
|
||||
|
||||
rs_baud(baud) u_int baud;
|
||||
void rs_baud(u_int baud)
|
||||
{
|
||||
switch (baud) {
|
||||
case 0: return B50;
|
||||
@ -395,7 +395,7 @@ rs_baud(baud) u_int baud;
|
||||
}
|
||||
}
|
||||
|
||||
rs_csize(csize) u_int csize;
|
||||
void rs_csize(u_int csize)
|
||||
{
|
||||
switch (csize) {
|
||||
case 0: return CS5;
|
||||
@ -406,7 +406,7 @@ rs_csize(csize) u_int csize;
|
||||
}
|
||||
}
|
||||
|
||||
rs_sbit(sbit) u_int sbit;
|
||||
void rs_sbit(u_int sbit)
|
||||
{
|
||||
switch (sbit) {
|
||||
case 0: return 0;
|
||||
@ -415,7 +415,7 @@ rs_sbit(sbit) u_int sbit;
|
||||
}
|
||||
}
|
||||
|
||||
rs232c_majorparam() {
|
||||
void rs232c_majorparam() {
|
||||
register int baud, csize, sbit;
|
||||
|
||||
if (RS232C_Fd >= 0) {
|
||||
@ -530,7 +530,7 @@ rs232c_majorparam() {
|
||||
}
|
||||
}
|
||||
|
||||
rs232c_minorparam() {
|
||||
void rs232c_minorparam() {
|
||||
int status;
|
||||
|
||||
if (RS232C_Fd >= 0) {
|
||||
@ -559,7 +559,7 @@ rs232c_minorparam() {
|
||||
* Following functions named as check_XXX are used for debug.
|
||||
*/
|
||||
|
||||
check_params(fd) int fd;
|
||||
void check_params(int fd)
|
||||
{
|
||||
struct termios tos;
|
||||
|
||||
@ -577,7 +577,7 @@ check_params(fd) int fd;
|
||||
check_cannon(&tos);
|
||||
}
|
||||
|
||||
check_brate(cf) u_long cf;
|
||||
void check_brate(u_long cf)
|
||||
{
|
||||
int b;
|
||||
printf("Baud rate : ");
|
||||
@ -602,7 +602,7 @@ check_brate(cf) u_long cf;
|
||||
printf("%d bps.\n", b);
|
||||
}
|
||||
|
||||
check_csize(cf) u_long cf;
|
||||
void check_csize(u_long cf)
|
||||
{
|
||||
int s;
|
||||
printf("Char size : ");
|
||||
@ -616,7 +616,7 @@ check_csize(cf) u_long cf;
|
||||
printf("%d chars.\n", s);
|
||||
}
|
||||
|
||||
check_sbit(cf) u_long cf;
|
||||
void check_sbit(u_long cf)
|
||||
{
|
||||
int s;
|
||||
printf("Stop bit : ");
|
||||
@ -626,7 +626,7 @@ check_sbit(cf) u_long cf;
|
||||
printf("1 bit.\n");
|
||||
}
|
||||
|
||||
check_parity(cf) u_long cf;
|
||||
void check_parity(u_long cf)
|
||||
{
|
||||
if (cf & PARENB) {
|
||||
printf("Parity Enabled : ");
|
||||
@ -639,7 +639,7 @@ check_parity(cf) u_long cf;
|
||||
}
|
||||
}
|
||||
|
||||
check_cannon(tos) struct termios *tos;
|
||||
void check_cannon(struct termios *tos)
|
||||
{
|
||||
u_long lf;
|
||||
|
||||
@ -653,7 +653,7 @@ check_cannon(tos) struct termios *tos;
|
||||
}
|
||||
}
|
||||
|
||||
check_oflag(of) u_long of;
|
||||
void check_oflag(u_long of)
|
||||
{
|
||||
if ((OPOST & of) == OPOST) {
|
||||
printf("OPOST : O\n");
|
||||
@ -725,7 +725,7 @@ check_oflag(of) u_long of;
|
||||
/*
|
||||
* In dbx, "call rsc()".
|
||||
*/
|
||||
rsc() {
|
||||
void rsc() {
|
||||
if (RS232C_Fd >= 0) check_params(RS232C_Fd);
|
||||
}
|
||||
|
||||
|
||||
10
src/socdvr.c
10
src/socdvr.c
@ -99,7 +99,7 @@ extern DLword *Lisp_world;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Open_Socket(args) LispPTR *args;
|
||||
LispPTR Open_Socket(LispPTR *args)
|
||||
{
|
||||
#ifdef TRACE
|
||||
printf("TRACE: Open_Socket()\n");
|
||||
@ -139,7 +139,7 @@ Open_Socket(args) LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Close_Socket() {
|
||||
LispPTR Close_Socket() {
|
||||
int stat;
|
||||
|
||||
#ifdef TRACE
|
||||
@ -174,7 +174,7 @@ typedef struct { /* Format for an X-server packet */
|
||||
#define PACKET_DEFOFFSET 46
|
||||
#define PACKET_MAXSIZE 638
|
||||
|
||||
Read_Socket(args) LispPTR *args;
|
||||
LispPTR Read_Socket(LispPTR *args)
|
||||
{
|
||||
PACKET *packet;
|
||||
char *buffer;
|
||||
@ -216,7 +216,7 @@ Read_Socket(args) LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Write_Socket(args) LispPTR *args;
|
||||
LispPTR Write_Socket(LispPTR *args)
|
||||
{
|
||||
PACKET *packet;
|
||||
char *buffer;
|
||||
@ -264,7 +264,7 @@ Write_Socket(args) LispPTR *args;
|
||||
/************************************************************************/
|
||||
extern int KBDEventFlg;
|
||||
|
||||
Kbd_Transition(args) LispPTR *args;
|
||||
void Kbd_Transition(LispPTR *args)
|
||||
/* args[0] is key-number */
|
||||
/* args[1] is up-flg */
|
||||
{
|
||||
|
||||
@ -41,8 +41,7 @@ void bcopy();
|
||||
* descriptor (network socket) or 0 if connection fails.
|
||||
*/
|
||||
|
||||
int connect_to_server(host, display) char *host;
|
||||
int display;
|
||||
int connect_to_server(char *host, int display)
|
||||
{
|
||||
struct sockaddr_in inaddr; /* INET socket address. */
|
||||
struct sockaddr *addr; /* address to connect to */
|
||||
|
||||
@ -79,7 +79,7 @@ int DebugDSP = T;
|
||||
|
||||
/* ================================================================ */
|
||||
|
||||
init_display2(display_addr, display_max) int display_addr, display_max;
|
||||
void init_display2(int display_addr, int display_max)
|
||||
{
|
||||
int mmapstat;
|
||||
int ioctlresult;
|
||||
@ -299,7 +299,7 @@ paint_display() {
|
||||
|
||||
#define BYTESPER_PAGE 512
|
||||
|
||||
read_datum(lispworld) char *lispworld;
|
||||
read_datum(char *lispworld)
|
||||
{
|
||||
int srcefile; /* fd */
|
||||
int i, j, sysout_size;
|
||||
|
||||
@ -1310,7 +1310,7 @@ void dtd_chain(DLword type) {
|
||||
|
||||
#ifdef DTDDEBUG
|
||||
|
||||
void check_dtd_chain(type) DLword type;
|
||||
void check_dtd_chain(DLword type)
|
||||
{
|
||||
register LispPTR next, onext;
|
||||
LispPTR before;
|
||||
|
||||
@ -19,8 +19,7 @@ static char *id = "$Id: timeoday.c,v 1.2 1999/01/03 02:07:37 sybalsky Exp $ Copy
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
gettimeofday(time, ptr) struct timeval *time;
|
||||
int ptr;
|
||||
void gettimeofday(struct timeval *time, int ptr)
|
||||
{
|
||||
struct rusage stats;
|
||||
getrusage(RUSAGE_SELF, &stats);
|
||||
|
||||
@ -19,8 +19,7 @@ static char *id = "$Id: timeofday.c,v 1.2 1999/01/03 02:07:37 sybalsky Exp $ Cop
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
|
||||
gettimeofday(time, ptr) struct timeval *time;
|
||||
int ptr;
|
||||
void gettimeofday(struct timeval *time, int ptr)
|
||||
{
|
||||
struct rusage stats;
|
||||
getrusage(RUSAGE_SELF, &stats);
|
||||
|
||||
35
src/timer.c
35
src/timer.c
@ -233,7 +233,7 @@ void update_miscstats() {
|
||||
|
||||
DLword *createcell68k();
|
||||
|
||||
LispPTR subr_gettime(args) LispPTR args[];
|
||||
LispPTR subr_gettime(LispPTR args[])
|
||||
{
|
||||
int result;
|
||||
result = gettime(args[0] & 0xffff);
|
||||
@ -263,7 +263,7 @@ LispPTR subr_gettime(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int gettime(casep) int casep;
|
||||
int gettime(int casep)
|
||||
{
|
||||
#ifndef USETIMEFN
|
||||
struct timeval timev;
|
||||
@ -342,7 +342,7 @@ int gettime(casep) int casep;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void subr_settime(args) LispPTR args[];
|
||||
void subr_settime(LispPTR args[])
|
||||
{
|
||||
#ifdef DOS
|
||||
struct dostime_t dostime;
|
||||
@ -383,7 +383,7 @@ void subr_settime(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void subr_copytimestats(args) LispPTR args[];
|
||||
void subr_copytimestats(LispPTR args[])
|
||||
{
|
||||
MISCSTATS *source;
|
||||
MISCSTATS *dest;
|
||||
@ -403,7 +403,7 @@ void subr_copytimestats(args) LispPTR args[];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR N_OP_rclk(tos) register LispPTR tos;
|
||||
LispPTR N_OP_rclk(LispPTR tos)
|
||||
{
|
||||
unsigned int usec;
|
||||
#ifdef DOS
|
||||
@ -508,14 +508,10 @@ static struct sigvec timerv;
|
||||
#endif /* SYSVSIGNALS */
|
||||
|
||||
#if (defined(OS4) || defined(SYSVONLY)) || defined(MACOSX) || defined(FREEBSD)
|
||||
void int_timer_service(sig, code, scp)
|
||||
void int_timer_service(int sig, int code, struct sigcontext *scp)
|
||||
#else
|
||||
int int_timer_service(sig, code, scp)
|
||||
int int_timer_service(int sig, int code, struct sigcontext *scp)
|
||||
#endif /* OS4 | SYSVONLY | MACOSX | FREEBSD */
|
||||
|
||||
int sig,
|
||||
code;
|
||||
struct sigcontext *scp;
|
||||
{
|
||||
/* this may have to do more in the future, like check for nested interrupts,
|
||||
etc... */
|
||||
@ -621,7 +617,7 @@ void int_timer_init()
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void int_io_open(fd) int fd;
|
||||
void int_io_open(int fd)
|
||||
{
|
||||
#ifdef DOS
|
||||
/* would turn on DOS kbd signal handler here */
|
||||
@ -637,7 +633,7 @@ void int_io_open(fd) int fd;
|
||||
#endif
|
||||
}
|
||||
|
||||
void int_io_close(fd) int fd;
|
||||
void int_io_close(int fd)
|
||||
{
|
||||
#ifdef DOS
|
||||
/* Turn off signaller here */
|
||||
@ -837,8 +833,7 @@ void int_timer_on() {
|
||||
/* The global used to signal floating-point errors */
|
||||
int FP_error = 0;
|
||||
|
||||
void int_fp_service(sig, code, scp) int sig, code;
|
||||
struct sigcontext *scp;
|
||||
void int_fp_service(int sig, int code, struct sigcontext *scp)
|
||||
{
|
||||
switch (code) {
|
||||
#ifdef AIXPS2
|
||||
@ -880,7 +875,7 @@ struct sigcontext *scp;
|
||||
#endif /* SYSVSIGNALS */
|
||||
}
|
||||
|
||||
int_fp_init() { /* first set up the signal handler */
|
||||
void int_fp_init() { /* first set up the signal handler */
|
||||
#ifndef ISC
|
||||
#ifdef AIXPS2
|
||||
if (sigset(SIGFPE, int_fp_service))
|
||||
@ -983,8 +978,10 @@ void int_file_init() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void panicuraid(sig, code, scp, addr) int sig, code;
|
||||
struct sigcontext *scp;
|
||||
/* 2017-06-22 NBriggs -- it's not clear that this definition has the correct
|
||||
parameters for any known signal handler
|
||||
*/
|
||||
void panicuraid(int sig, int code, struct sigcontext *scp, void *addr)
|
||||
{
|
||||
static char errormsg[200];
|
||||
static char *stdmsg =
|
||||
@ -1185,7 +1182,7 @@ void DOStimer() {
|
||||
/* (pts to 'ret' if no prev installed)*/
|
||||
}
|
||||
|
||||
void alarm(sec) unsigned long sec;
|
||||
void alarm(unsigned long sec)
|
||||
{
|
||||
/* tick_count = sec * 18;
|
||||
_dos_setvect(0x1c, DOStimer); */
|
||||
|
||||
@ -54,7 +54,7 @@ extern int Inited_Video;
|
||||
|
||||
int Inited_TrueColor = NIL;
|
||||
|
||||
int TrueColor_Op(args) LispPTR *args;
|
||||
int TrueColor_Op(LispPTR *args)
|
||||
{
|
||||
int op, ret_value = NIL;
|
||||
/*
|
||||
@ -142,7 +142,7 @@ extern int DisplayType;
|
||||
Pixrect *OverlayCursor, *OverlaySave;
|
||||
DLword *OverlayRegion68k;
|
||||
|
||||
int TrueColor_Initialize(overlay_bmbase) LispPTR overlay_bmbase;
|
||||
int TrueColor_Initialize(LispPTR overlay_bmbase)
|
||||
{
|
||||
unsigned int pict, *ret_value;
|
||||
Pixrect *source;
|
||||
@ -202,7 +202,7 @@ int TrueColor_Initialize(overlay_bmbase) LispPTR overlay_bmbase;
|
||||
|
||||
DLword *VideoEnableRegion68k;
|
||||
|
||||
int TrueColor_VideoInitialize(videoenable_bmbase) LispPTR videoenable_bmbase;
|
||||
int TrueColor_VideoInitialize(LispPTR videoenable_bmbase)
|
||||
{
|
||||
Pixrect *source;
|
||||
int mmapstat, size;
|
||||
@ -237,7 +237,7 @@ int TrueColor_VideoInitialize(videoenable_bmbase) LispPTR videoenable_bmbase;
|
||||
|
||||
} /* TrueColor_VideoInitialize */
|
||||
|
||||
int Overlay_Region(left, top, width, height, flg) int left, top, width, height, flg;
|
||||
int Overlay_Region(int left, int top, int width, int height, int flg)
|
||||
{
|
||||
ScreenLocked = T;
|
||||
overlay_mouse_down();
|
||||
@ -264,7 +264,7 @@ int Overlay_Region(left, top, width, height, flg) int left, top, width, height,
|
||||
|
||||
extern Pixrect *OverlaySave, *OverlayCursor;
|
||||
|
||||
overlay_mouse_up(newx, newy) int newx, newy;
|
||||
void overlay_mouse_up(int newx, int newy)
|
||||
{
|
||||
pr_set_plane_group(TrueColorFb, PIXPG_OVERLAY_ENABLE);
|
||||
pr_rop(TrueColorFb, newx, newy, 16, 16, PIX_SRC, OverlaySave, 0, 0);
|
||||
@ -275,14 +275,14 @@ overlay_mouse_up(newx, newy) int newx, newy;
|
||||
|
||||
extern int LastCursorX, LastCursorY;
|
||||
|
||||
overlay_mouse_down() {
|
||||
void overlay_mouse_down() {
|
||||
pr_set_plane_group(TrueColorFb, PIXPG_OVERLAY_ENABLE);
|
||||
pr_rop(OverlaySave, 0, 0, 16, 16, PIX_SRC, TrueColorFb, LastCursorX, LastCursorY);
|
||||
pr_set_plane_group(TrueColorFb, PIXPG_24BIT_COLOR);
|
||||
|
||||
} /* end overlay_mouse_down */
|
||||
|
||||
truecolor_before_exit() {
|
||||
void truecolor_before_exit() {
|
||||
if (Inited_TrueColor) {
|
||||
{ /* fill region */
|
||||
int h, w;
|
||||
@ -326,7 +326,7 @@ extern int Video_OnOff_Flg;
|
||||
static int video_onoff;
|
||||
#endif /* VIDEO */
|
||||
|
||||
truecolor_before_raid() {
|
||||
void truecolor_before_raid() {
|
||||
int size;
|
||||
|
||||
if (Inited_TrueColor) {
|
||||
@ -372,7 +372,7 @@ truecolor_before_raid() {
|
||||
|
||||
} /* end truecolor_before_raid */
|
||||
|
||||
truecolor_after_raid() {
|
||||
void truecolor_after_raid() {
|
||||
int size, mmapstat;
|
||||
|
||||
if (Inited_TrueColor) {
|
||||
|
||||
26
src/tty.c
26
src/tty.c
@ -26,7 +26,7 @@ int TTY_Fd;
|
||||
extern int LispReadFds;
|
||||
struct sgttyb TTY_Mode;
|
||||
|
||||
tty_init() {
|
||||
void tty_init() {
|
||||
#ifdef TRACE
|
||||
printf("TRACE: tty_init()\n");
|
||||
#endif
|
||||
@ -39,7 +39,7 @@ tty_init() {
|
||||
DLTTYOut = (DLTTY_OUT_CSB *)Addr68k_from_LADDR(IOPAGE_OFFSET + 34);
|
||||
} /* tty_init end */
|
||||
|
||||
tty_open() {
|
||||
void tty_open() {
|
||||
int stat;
|
||||
|
||||
#ifdef TRACE
|
||||
@ -63,7 +63,7 @@ tty_open() {
|
||||
}
|
||||
} /* tty_open end */
|
||||
|
||||
tty_close() {
|
||||
void tty_close() {
|
||||
int stat;
|
||||
|
||||
#ifdef TRACE
|
||||
@ -80,7 +80,7 @@ tty_close() {
|
||||
}
|
||||
} /* tty_close end */
|
||||
|
||||
TTY_get() {
|
||||
void TTY_get() {
|
||||
char indata[256];
|
||||
int count;
|
||||
|
||||
@ -100,7 +100,7 @@ TTY_get() {
|
||||
}
|
||||
} /* TTY_get end */
|
||||
|
||||
tty_put() {
|
||||
void tty_put() {
|
||||
int count;
|
||||
char c;
|
||||
|
||||
@ -114,7 +114,7 @@ tty_put() {
|
||||
}
|
||||
} /* tty_put end */
|
||||
|
||||
tty_breakon() {
|
||||
void tty_breakon() {
|
||||
int stat;
|
||||
|
||||
#ifdef TRACE
|
||||
@ -124,7 +124,7 @@ tty_breakon() {
|
||||
if (TTY_Fd >= 0) { stat = ioctl(TTY_Fd, TIOCSBRK, 0); }
|
||||
} /* tty_breakon end */
|
||||
|
||||
tty_breakoff() {
|
||||
void tty_breakoff() {
|
||||
int stat;
|
||||
|
||||
#ifdef TRACE
|
||||
@ -134,7 +134,7 @@ tty_breakoff() {
|
||||
if (TTY_Fd >= 0) { stat = ioctl(TTY_Fd, TIOCCBRK, 0); }
|
||||
} /* tty_breakoff end */
|
||||
|
||||
TTY_cmd() {
|
||||
void TTY_cmd() {
|
||||
#ifdef TRACE
|
||||
printf("TRACE: tty_cmd()\n");
|
||||
#endif
|
||||
@ -159,7 +159,7 @@ TTY_cmd() {
|
||||
}
|
||||
} /* TTY_cmd end */
|
||||
|
||||
tty_setparam() {
|
||||
void tty_setparam() {
|
||||
#ifdef TRACE
|
||||
printf("TRACE: tty_setpram()\n");
|
||||
#endif
|
||||
@ -168,7 +168,7 @@ tty_setparam() {
|
||||
|
||||
} /* tty_setpram end */
|
||||
|
||||
tty_setbaudrate() {
|
||||
void tty_setbaudrate() {
|
||||
char baudrate;
|
||||
int stat;
|
||||
|
||||
@ -187,9 +187,9 @@ tty_setbaudrate() {
|
||||
}
|
||||
} /* tty_setbaudrate end */
|
||||
|
||||
tty_baudtosymbol(aBaud) short aBaud;
|
||||
int tty_baudtosymbol(short aBaud)
|
||||
{
|
||||
#ifdef TRASE
|
||||
#ifdef TRACE
|
||||
printf("TRASE: tty_baudtosymbol(%x)\n", aBaud);
|
||||
#endif
|
||||
|
||||
@ -209,7 +209,7 @@ tty_baudtosymbol(aBaud) short aBaud;
|
||||
|
||||
} /* tty_baudtosymbol */
|
||||
|
||||
tty_debug(name) char *name;
|
||||
void tty_debug(char *name)
|
||||
{
|
||||
int stat;
|
||||
struct sgttyb mode;
|
||||
|
||||
@ -59,7 +59,7 @@ static char *id = "$Id: ufn.c,v 1.2 1999/01/03 02:07:41 sybalsky Exp $ Copyright
|
||||
*/
|
||||
/******************************************************************/
|
||||
|
||||
ufn(bytecode) DLword bytecode;
|
||||
void ufn(DLword bytecode)
|
||||
{
|
||||
register DefCell *defcell68k; /* Definition Cell PTR */
|
||||
register int pv_num; /* scratch for pv */
|
||||
|
||||
29
src/ufs.c
29
src/ufs.c
@ -199,7 +199,7 @@ exit_host_filesystem() {
|
||||
* can open the file with the specified mode or not.
|
||||
*/
|
||||
|
||||
LispPTR UFS_getfilename(args) register LispPTR *args;
|
||||
LispPTR UFS_getfilename(LispPTR *args)
|
||||
{
|
||||
register char *base;
|
||||
register int len, rval;
|
||||
@ -286,7 +286,7 @@ LispPTR UFS_getfilename(args) register LispPTR *args;
|
||||
* a specified file.
|
||||
*/
|
||||
|
||||
LispPTR UFS_deletefile(args) register LispPTR *args;
|
||||
LispPTR UFS_deletefile(LispPTR *args)
|
||||
{
|
||||
char file[MAXPATHLEN], fbuf[MAXPATHLEN];
|
||||
register int len, rval;
|
||||
@ -341,7 +341,7 @@ LispPTR UFS_deletefile(args) register LispPTR *args;
|
||||
* a specified file.
|
||||
*/
|
||||
|
||||
LispPTR UFS_renamefile(args) register LispPTR *args;
|
||||
LispPTR UFS_renamefile(LispPTR *args)
|
||||
{
|
||||
char fbuf[MAXPATHLEN], src[MAXPATHLEN], dst[MAXPATHLEN];
|
||||
int rval, len;
|
||||
@ -411,7 +411,7 @@ LispPTR UFS_renamefile(args) register LispPTR *args;
|
||||
* the directory name representation.
|
||||
*/
|
||||
|
||||
LispPTR UFS_directorynamep(args) register LispPTR *args;
|
||||
LispPTR UFS_directorynamep(LispPTR *args)
|
||||
{
|
||||
char dirname[MAXPATHLEN];
|
||||
char fullname[MAXPATHLEN];
|
||||
@ -494,16 +494,10 @@ LispPTR UFS_directorynamep(args) register LispPTR *args;
|
||||
*
|
||||
*/
|
||||
#ifdef DOS
|
||||
int unixpathname(src, dst, versionp, genp, drive, extlenptr, rawname) char *drive;
|
||||
int *extlenptr;
|
||||
char *rawname;
|
||||
int unixpathname(char *src, char *dst, int versionp, int genp, char *drive, int *extlenptr, char *rawname)
|
||||
#else
|
||||
int unixpathname(src, dst, versionp, genp)
|
||||
int unixpathname(char *src, char *dst, int versionp, int genp)
|
||||
#endif /* DOS */
|
||||
register char *src;
|
||||
register char *dst;
|
||||
register int versionp;
|
||||
register int genp;
|
||||
{
|
||||
register char *cp, *dp, *np, *rp;
|
||||
register int newdirflg;
|
||||
@ -907,10 +901,7 @@ register int genp;
|
||||
*
|
||||
*/
|
||||
|
||||
int lisppathname(fullname, lispname, dirp, versionp) register char *fullname;
|
||||
register char *lispname;
|
||||
register int dirp;
|
||||
register int versionp;
|
||||
int lisppathname(char *fullname, char *lispname, int dirp, int versionp)
|
||||
{
|
||||
register char *cp, *dp, *lnamep, *cnamep;
|
||||
char namebuf[MAXPATHLEN], fbuf[MAXPATHLEN], ver[VERSIONLEN], drive;
|
||||
@ -1165,7 +1156,7 @@ register int versionp;
|
||||
* Lisp sense or not.
|
||||
*/
|
||||
|
||||
int quote_fname(file) register char *file;
|
||||
int quote_fname(char *file)
|
||||
{
|
||||
register char *cp, *dp;
|
||||
register int extensionp;
|
||||
@ -1250,7 +1241,7 @@ int quote_fname(file) register char *file;
|
||||
* and being converted to {UNIX} name.
|
||||
*/
|
||||
|
||||
int quote_fname_ufs(file) register char *file;
|
||||
int quote_fname_ufs(char *file)
|
||||
{
|
||||
register char *cp, *dp;
|
||||
register int extensionp;
|
||||
@ -1326,7 +1317,7 @@ int quote_fname_ufs(file) register char *file;
|
||||
* name. Both {DSK} and {UNIX} uses this routine.
|
||||
*/
|
||||
|
||||
int quote_dname(dir) register char *dir;
|
||||
int quote_dname(char *dir)
|
||||
{
|
||||
register char *cp, *dp;
|
||||
char fbuf[MAXNAMLEN + 1];
|
||||
|
||||
@ -219,7 +219,7 @@ char *build_socket_pathname(int desc) {
|
||||
|
||||
#else
|
||||
|
||||
char *build_upward_socket_pathname(desc) int desc;
|
||||
char *build_upward_socket_pathname(int desc)
|
||||
{
|
||||
static char UpPathName[50];
|
||||
|
||||
@ -227,7 +227,7 @@ char *build_upward_socket_pathname(desc) int desc;
|
||||
return (UpPathName);
|
||||
}
|
||||
|
||||
char *build_downward_socket_pathname(desc) int desc;
|
||||
char *build_downward_socket_pathname(int desc)
|
||||
{
|
||||
static char DownPathName[50];
|
||||
|
||||
@ -583,8 +583,8 @@ LispPTR Unix_handlecomm(LispPTR *args) {
|
||||
unlink(PipeName);
|
||||
#endif /* ISC */
|
||||
|
||||
/* unlink(UpPipeName);
|
||||
unlink(DownPipeName); */
|
||||
/* unlink(UpPipeName); */
|
||||
/* unlink(DownPipeName); */
|
||||
#ifdef ISC
|
||||
return (GetSmallp(sockFD));
|
||||
#else
|
||||
|
||||
290
src/unixfork.c
290
src/unixfork.c
@ -92,12 +92,17 @@ typedef int clockid_t;
|
||||
#include <sgtty.h>
|
||||
#endif
|
||||
|
||||
/* The following globals are used to communicate between Unix
|
||||
subprocesses and LISP */
|
||||
|
||||
long StartTime; /* Time, for creating pipe filenames */
|
||||
|
||||
char shcom[512]; /* Here because I'm suspicious of */
|
||||
/* large allocations on the stack */
|
||||
|
||||
|
||||
static __inline__ int
|
||||
#ifdef OS4
|
||||
SAFEREAD(f, b, c)
|
||||
#else
|
||||
SAFEREAD(int f, char *b, int c)
|
||||
#endif
|
||||
{
|
||||
int res;
|
||||
loop:
|
||||
@ -109,13 +114,139 @@ loop:
|
||||
return (res);
|
||||
}
|
||||
|
||||
/* The following globals are used to communicate between Unix
|
||||
subprocesses and LISP */
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* F o r k U n i x S h e l l */
|
||||
/* */
|
||||
/* Fork a PTY connection to a C-shell process. */
|
||||
/* Returns PID of process, or -1 if something failed */
|
||||
/* */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
long StartTime; /* Time, for creating pipe filenames */
|
||||
/* Creates a PTY connection to a csh */
|
||||
|
||||
char shcom[512]; /* Here because I'm suspicious of */
|
||||
/* large allocations on the stack */
|
||||
#ifdef FULLSLAVENAME
|
||||
ForkUnixShell(int slot, char *PtySlave, char *termtype, char *shellarg)
|
||||
#else
|
||||
ForkUnixShell(int slot, char ltr, char numb, char *termtype, char *shellarg)
|
||||
#endif
|
||||
{
|
||||
#ifdef FULLSLAVENAME
|
||||
char buf[1];
|
||||
#else
|
||||
char PtySlave[20], buf[1];
|
||||
#endif
|
||||
int res, PID, MasterFD, SlaveFD;
|
||||
#ifdef USETERMIOS
|
||||
struct termios tio;
|
||||
#else
|
||||
struct sgttyb tio;
|
||||
#endif /* USETERMIOS */
|
||||
|
||||
PID = fork();
|
||||
|
||||
if (PID == 0) {
|
||||
char envstring[64];
|
||||
char *argvec[4];
|
||||
|
||||
#ifndef SYSVONLY
|
||||
/* Divorce ourselves from /dev/tty */
|
||||
res = open("/dev/tty", O_RDWR);
|
||||
if (res >= 0) {
|
||||
(void)ioctl(res, TIOCNOTTY, (char *)0);
|
||||
(void)close(res);
|
||||
} else {
|
||||
perror("Slave TTY");
|
||||
exit(0);
|
||||
}
|
||||
#else
|
||||
if (0 > setsid()) /* create us a new session for tty purposes */
|
||||
perror("setsid");
|
||||
#endif
|
||||
|
||||
/* Open the slave side */
|
||||
#ifndef FULLSLAVENAME
|
||||
sprintf(PtySlave, "/dev/tty%c%c", ltr, numb);
|
||||
#endif
|
||||
SlaveFD = open(PtySlave, O_RDWR);
|
||||
if (SlaveFD == -1) {
|
||||
perror("Slave Open");
|
||||
perror(PtySlave);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#ifdef OS5
|
||||
ioctl(SlaveFD, I_PUSH, "ptem");
|
||||
ioctl(SlaveFD, I_PUSH, "ldterm");
|
||||
#endif /* OS5 */
|
||||
|
||||
#ifndef USETERMIOS
|
||||
/* This is the old way we set up terminal (OS 3), using an
|
||||
obsolete ioctl and wrong flags for a display. */
|
||||
ioctl(SlaveFD, TIOCGETP, (char *)&tio);
|
||||
tio.sg_flags |= CRMOD;
|
||||
tio.sg_flags |= ECHO;
|
||||
ioctl(SlaveFD, TIOCSETP, (char *)&tio);
|
||||
#else
|
||||
/* Set up as basic display terminal: canonical erase,
|
||||
kill processing, echo, backspace to erase, echo ctrl
|
||||
chars as ^x, kill line by backspacing */
|
||||
|
||||
#if defined(MACOSX) || defined(FREEBSD)
|
||||
tcgetattr(SlaveFD, &tio);
|
||||
#else
|
||||
ioctl(SlaveFD, TCGETS, (char *)&tio);
|
||||
#endif
|
||||
#ifdef INDIGO
|
||||
tio.c_lflag |= ICANON | ECHO | ECHOE;
|
||||
#else
|
||||
tio.c_lflag |= ICANON | ECHO | ECHOE | ECHOCTL | ECHOKE;
|
||||
#endif /* INDIGO */
|
||||
#if defined(MACOSX) || defined(FREEBSD)
|
||||
tcsetattr(SlaveFD, TCSANOW, &tio);
|
||||
#else
|
||||
ioctl(SlaveFD, TCSETS, (char *)&tio);
|
||||
#endif
|
||||
#endif /* USETERMIOS */
|
||||
|
||||
(void)dup2(SlaveFD, 0);
|
||||
(void)dup2(SlaveFD, 1);
|
||||
(void)dup2(SlaveFD, 2);
|
||||
(void)close(SlaveFD);
|
||||
|
||||
/* set the LDESHELL variable so the underlying .cshrc can see it and
|
||||
configure the shell appropriately, though this may not be so important any more */
|
||||
putenv("LDESHELL=YES");
|
||||
|
||||
if ((termtype[0] != 0) && (strlen(termtype) < 59)) { /* set the TERM environment var */
|
||||
sprintf(envstring, "TERM=%s", termtype);
|
||||
putenv(envstring);
|
||||
}
|
||||
/* Start up csh */
|
||||
argvec[0] = "csh";
|
||||
if (shellarg[0] != 0) { /* setup to run command */
|
||||
argvec[1] = "-c"; /* read commands from next arg */
|
||||
argvec[2] = shellarg;
|
||||
argvec[3] = (char *)0;
|
||||
} else
|
||||
argvec[1] = (char *)0;
|
||||
|
||||
execv("/bin/csh", argvec);
|
||||
|
||||
/* Should never get here */
|
||||
perror("execv");
|
||||
exit(0);
|
||||
} else { /* not the forked process. */
|
||||
if (shellarg != shcom) free(shellarg);
|
||||
}
|
||||
|
||||
/* Set the process group so all the kids get the bullet too
|
||||
if (setpgrp(PID, PID) != 0)
|
||||
perror("setpgrp"); */
|
||||
|
||||
return (PID);
|
||||
}
|
||||
|
||||
/* fork_Unix is the secondary process spawned right after LISP is
|
||||
started, to avoid having TWO 8 mbyte images sitting around. It listens
|
||||
@ -541,144 +672,3 @@ fork_Unix() {
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
/* F o r k U n i x S h e l l */
|
||||
/* */
|
||||
/* Fork a PTY connection to a C-shell process. */
|
||||
/* Returns PID of process, or -1 if something failed */
|
||||
/* */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
/* Creates a PTY connection to a csh */
|
||||
|
||||
#ifdef FULLSLAVENAME
|
||||
ForkUnixShell(slot, PtySlave, termtype, shellarg)
|
||||
#else
|
||||
ForkUnixShell(slot, ltr, numb, termtype, shellarg)
|
||||
#endif
|
||||
int slot;
|
||||
#ifdef FULLSLAVENAME
|
||||
char *PtySlave;
|
||||
#else
|
||||
char ltr, numb;
|
||||
#endif
|
||||
char *termtype, *shellarg;
|
||||
|
||||
{
|
||||
#ifdef FULLSLAVENAME
|
||||
char buf[1];
|
||||
#else
|
||||
char PtySlave[20], buf[1];
|
||||
#endif
|
||||
int res, PID, MasterFD, SlaveFD;
|
||||
#ifdef USETERMIOS
|
||||
struct termios tio;
|
||||
#else
|
||||
struct sgttyb tio;
|
||||
#endif /* USETERMIOS */
|
||||
|
||||
PID = fork();
|
||||
|
||||
if (PID == 0) {
|
||||
char envstring[64];
|
||||
char *argvec[4];
|
||||
|
||||
#ifndef SYSVONLY
|
||||
/* Divorce ourselves from /dev/tty */
|
||||
res = open("/dev/tty", O_RDWR);
|
||||
if (res >= 0) {
|
||||
(void)ioctl(res, TIOCNOTTY, (char *)0);
|
||||
(void)close(res);
|
||||
} else {
|
||||
perror("Slave TTY");
|
||||
exit(0);
|
||||
}
|
||||
#else
|
||||
if (0 > setsid()) /* create us a new session for tty purposes */
|
||||
perror("setsid");
|
||||
#endif
|
||||
|
||||
/* Open the slave side */
|
||||
#ifndef FULLSLAVENAME
|
||||
sprintf(PtySlave, "/dev/tty%c%c", ltr, numb);
|
||||
#endif
|
||||
SlaveFD = open(PtySlave, O_RDWR);
|
||||
if (SlaveFD == -1) {
|
||||
perror("Slave Open");
|
||||
perror(PtySlave);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#ifdef OS5
|
||||
ioctl(SlaveFD, I_PUSH, "ptem");
|
||||
ioctl(SlaveFD, I_PUSH, "ldterm");
|
||||
#endif /* OS5 */
|
||||
|
||||
#ifndef USETERMIOS
|
||||
/* This is the old way we set up terminal (OS 3), using an
|
||||
obsolete ioctl and wrong flags for a display. */
|
||||
ioctl(SlaveFD, TIOCGETP, (char *)&tio);
|
||||
tio.sg_flags |= CRMOD;
|
||||
tio.sg_flags |= ECHO;
|
||||
ioctl(SlaveFD, TIOCSETP, (char *)&tio);
|
||||
#else
|
||||
/* Set up as basic display terminal: canonical erase,
|
||||
kill processing, echo, backspace to erase, echo ctrl
|
||||
chars as ^x, kill line by backspacing */
|
||||
|
||||
#if defined(MACOSX) || defined(FREEBSD)
|
||||
tcgetattr(SlaveFD, &tio);
|
||||
#else
|
||||
ioctl(SlaveFD, TCGETS, (char *)&tio);
|
||||
#endif
|
||||
#ifdef INDIGO
|
||||
tio.c_lflag |= ICANON | ECHO | ECHOE;
|
||||
#else
|
||||
tio.c_lflag |= ICANON | ECHO | ECHOE | ECHOCTL | ECHOKE;
|
||||
#endif /* INDIGO */
|
||||
#if defined(MACOSX) || defined(FREEBSD)
|
||||
tcsetattr(SlaveFD, TCSANOW, &tio);
|
||||
#else
|
||||
ioctl(SlaveFD, TCSETS, (char *)&tio);
|
||||
#endif
|
||||
#endif /* USETERMIOS */
|
||||
|
||||
(void)dup2(SlaveFD, 0);
|
||||
(void)dup2(SlaveFD, 1);
|
||||
(void)dup2(SlaveFD, 2);
|
||||
(void)close(SlaveFD);
|
||||
|
||||
/* set the LDESHELL variable so the underlying .cshrc can see it and
|
||||
configure the shell appropriately, though this may not be so important any more */
|
||||
putenv("LDESHELL=YES");
|
||||
|
||||
if ((termtype[0] != 0) && (strlen(termtype) < 59)) { /* set the TERM environment var */
|
||||
sprintf(envstring, "TERM=%s", termtype);
|
||||
putenv(envstring);
|
||||
}
|
||||
/* Start up csh */
|
||||
argvec[0] = "csh";
|
||||
if (shellarg[0] != 0) { /* setup to run command */
|
||||
argvec[1] = "-c"; /* read commands from next arg */
|
||||
argvec[2] = shellarg;
|
||||
argvec[3] = (char *)0;
|
||||
} else
|
||||
argvec[1] = (char *)0;
|
||||
|
||||
execv("/bin/csh", argvec);
|
||||
|
||||
/* Should never get here */
|
||||
perror("execv");
|
||||
exit(0);
|
||||
} else { /* not the forked process. */
|
||||
if (shellarg != shcom) free(shellarg);
|
||||
}
|
||||
|
||||
/* Set the process group so all the kids get the bullet too
|
||||
if (setpgrp(PID, PID) != 0)
|
||||
perror("setpgrp"); */
|
||||
|
||||
return (PID);
|
||||
}
|
||||
|
||||
11
src/unwind.c
11
src/unwind.c
@ -108,10 +108,7 @@ UNSIGNED N_OP_unwind(register LispPTR *cstkptr, register LispPTR tos, int n, int
|
||||
/******************************************************************/
|
||||
#define SMALLP(x) (((unsigned int)x >> 16) == (S_POSITIVE >> 16))
|
||||
|
||||
LispPTR find_the_blip(blip, throwp, unwinder) register LispPTR blip;
|
||||
register LispPTR throwp;
|
||||
FX *unwinder;
|
||||
|
||||
LispPTR find_the_blip(LispPTR blip, LispPTR throwp, FX *unwinder)
|
||||
{
|
||||
register LispPTR target;
|
||||
register FX *target_addr;
|
||||
@ -145,8 +142,7 @@ cons_result:
|
||||
return (cons(StkOffset_from_68K(target), pc));
|
||||
}
|
||||
|
||||
LispPTR variable_name_in_frame(fx_addr, code) FX *fx_addr;
|
||||
register LispPTR code;
|
||||
LispPTR variable_name_in_frame(FX *fx_addr, LispPTR code)
|
||||
{
|
||||
register DLword *name_ptr;
|
||||
register DLword *name_bind_ptr;
|
||||
@ -172,8 +168,7 @@ register LispPTR code;
|
||||
*/
|
||||
/******************************************************************/
|
||||
|
||||
LispPTR pvar_value_in_frame(frame_addr, atom_index) register FX *frame_addr;
|
||||
register LispPTR atom_index;
|
||||
LispPTR pvar_value_in_frame(FX *frame_addr, LispPTR atom_index)
|
||||
|
||||
{
|
||||
register DLword *name_ptr;
|
||||
|
||||
13
src/uraid.c
13
src/uraid.c
@ -281,7 +281,7 @@ extern int PrintMaxLevel; /* for print level */
|
||||
/***********************************************************************/
|
||||
|
||||
LispPTR make_atom();
|
||||
LispPTR parse_atomstring(string) char *string;
|
||||
LispPTR parse_atomstring(char *string)
|
||||
{
|
||||
char *start, *packageptr, *nameptr;
|
||||
int flag = 0;
|
||||
@ -339,9 +339,7 @@ void uraid_commclear() {
|
||||
URaid_argnum = 0;
|
||||
}
|
||||
|
||||
void copy_region(src, dst, width, h) register short *src, *dst;
|
||||
int width;
|
||||
register int h;
|
||||
void copy_region(short *src, short *dst, int width, int h)
|
||||
{
|
||||
register int w;
|
||||
|
||||
@ -994,8 +992,7 @@ int device_before_raid() {
|
||||
}
|
||||
|
||||
/**
|
||||
char *alloc_hideDISP(size)
|
||||
int size;
|
||||
char *alloc_hideDISP(int size)
|
||||
{
|
||||
char *retaddr;
|
||||
switch(*STORAGEFULLSTATE_word & 0xffff)
|
||||
@ -1131,7 +1128,7 @@ int device_after_raid() {
|
||||
/***********************************************************************/
|
||||
#ifndef COLOR
|
||||
|
||||
int re_init_display(lisp_display_addr, display_max) int lisp_display_addr, display_max;
|
||||
int re_init_display(int lisp_display_addr, int display_max)
|
||||
{
|
||||
int mmapstat, size;
|
||||
struct pixrect *ColorFb;
|
||||
@ -1241,7 +1238,7 @@ int re_init_display(lisp_display_addr, display_max) int lisp_display_addr, displ
|
||||
|
||||
#else /* COLOR */
|
||||
|
||||
re_init_display(lisp_display_addr, display_max) int lisp_display_addr, display_max;
|
||||
int re_init_display(int lisp_display_addr, int display_max)
|
||||
{
|
||||
int mmapstat, size;
|
||||
struct pixrect *ColorFb;
|
||||
|
||||
@ -96,7 +96,7 @@ extern int dosdisplaymode;
|
||||
/* General utility function for doing a BIOS call to the VESA */
|
||||
/* bios. */
|
||||
/**************************************************************/
|
||||
VESA_call(class, subfunc) int class, subfunc;
|
||||
int VESA_call(int class, int subfunc)
|
||||
{
|
||||
union REGS inregs, outregs;
|
||||
|
||||
@ -107,7 +107,7 @@ VESA_call(class, subfunc) int class, subfunc;
|
||||
return ((outregs.h.al == VESA) && (outregs.h.ah == SUCESS));
|
||||
}
|
||||
|
||||
unsigned long set_DAC_color(args) LispPTR args[];
|
||||
unsigned long set_DAC_color(LispPTR args[])
|
||||
{
|
||||
union REGS inregs, outregs;
|
||||
|
||||
@ -150,7 +150,7 @@ int VESA_currentmode() {
|
||||
}
|
||||
}
|
||||
|
||||
int VESA_setmode(mode, clearscreen) int mode, clearscreen;
|
||||
int VESA_setmode(int mode, int clearscreen)
|
||||
{
|
||||
union REGS inregs, outregs;
|
||||
|
||||
@ -166,7 +166,7 @@ char VESAmodevector[VESABUFLEN];
|
||||
char *VESAmodebytes = VESAmodevector;
|
||||
|
||||
/* VESA_describemode */
|
||||
int VESA_describemode(mode) int mode;
|
||||
int VESA_describemode(int mode)
|
||||
{
|
||||
union REGS inregs, outregs;
|
||||
int i;
|
||||
@ -216,7 +216,7 @@ void VESA_Intrpt_Hndlr(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void VESA_beforeraid(dsp) DspInterface dsp;
|
||||
void VESA_beforeraid(DspInterface dsp)
|
||||
{
|
||||
TPRINT(("Enter VESA_beforeraid\n"));
|
||||
_setvideomode(_DEFAULTMODE);
|
||||
@ -224,14 +224,14 @@ void VESA_beforeraid(dsp) DspInterface dsp;
|
||||
TPRINT(("Exit VESA_beforeraid\n"));
|
||||
}
|
||||
|
||||
void VESA_afterraid(dsp) DspInterface dsp;
|
||||
void VESA_afterraid(DspInterface dsp)
|
||||
{
|
||||
TPRINT(("Enter VESA_afterraid\n"));
|
||||
VESA_setmode(dsp->graphicsmode, TRUE);
|
||||
TPRINT(("Exit VESA_afterraid\n"));
|
||||
}
|
||||
|
||||
void VESA_enter(dsp) DspInterface dsp;
|
||||
void VESA_enter(DspInterface dsp)
|
||||
{
|
||||
union REGS regs;
|
||||
|
||||
@ -308,7 +308,7 @@ void VESA_enter(dsp) DspInterface dsp;
|
||||
TPRINT(("Exit VESA_enter\n"));
|
||||
}
|
||||
|
||||
void VESA_exit(dsp) DspInterface dsp;
|
||||
void VESA_exit(DspInterface dsp)
|
||||
{
|
||||
TPRINT(("Enter VESA_exit\n"));
|
||||
/* Unlock the following to avoid waste of mainmem. */
|
||||
@ -327,8 +327,7 @@ void VESA_exit(dsp) DspInterface dsp;
|
||||
TPRINT(("Exit VESA_exit\n"));
|
||||
}
|
||||
|
||||
VESA_errorexit(s, errno) char *s;
|
||||
int errno;
|
||||
VESA_errorexit(char *s, int errno)
|
||||
{
|
||||
_setvideomode(_DEFAULTMODE);
|
||||
_clearscreen(_GCLEARSCREEN);
|
||||
@ -337,16 +336,14 @@ int errno;
|
||||
exit(errno);
|
||||
}
|
||||
|
||||
void tmpclearbanks(dsp) DspInterface dsp;
|
||||
void tmpclearbanks(DspInterface dsp)
|
||||
{
|
||||
TPRINT(("Enter tmpclearbanks\n"));
|
||||
/* Dosclearbanks(dsp); */
|
||||
TPRINT(("Exit tmpclearbanks\n"));
|
||||
}
|
||||
|
||||
unsigned long tmpbbt(dsp, buffer, left, top, swidth, height) DspInterface dsp;
|
||||
char *buffer;
|
||||
long left, top, swidth, height;
|
||||
unsigned long tmpbbt(DspInterface dsp, char *buffer, long left, long top, long swidth, long height)
|
||||
{
|
||||
TPRINT(("Enter tmpbbt\n"));
|
||||
TPRINT(("Mode display is: %d\n", dsp->graphicsmode));
|
||||
@ -357,9 +354,7 @@ long left, top, swidth, height;
|
||||
TPRINT(("Exit tmpbbt\n"));
|
||||
}
|
||||
|
||||
VESA_init(dsp, lispbitmap, width_hint, height_hint, depth_hint) DspInterface dsp;
|
||||
char *lispbitmap;
|
||||
int width_hint, height_hint, depth_hint;
|
||||
void VESA_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hint, int depth_hint)
|
||||
{
|
||||
TPRINT(("Enter VESA_init\n"));
|
||||
/* Kludge. going away soon. */
|
||||
|
||||
@ -34,7 +34,7 @@ extern void docopy();
|
||||
|
||||
extern void GenericPanic();
|
||||
|
||||
void VGA_setmax(dsp) DspInterface dsp;
|
||||
void VGA_setmax(DspInterface dsp)
|
||||
{
|
||||
struct videoconfig vc;
|
||||
|
||||
@ -61,7 +61,7 @@ void VGA_setmax(dsp) DspInterface dsp;
|
||||
_dpmi_lockregion((void *)&docopy, 0x2000);
|
||||
}
|
||||
|
||||
void VGA_exit(dsp) DspInterface dsp;
|
||||
void VGA_exit(DspInterface dsp)
|
||||
{
|
||||
/* Unlock the following to avoid waste of mainmem. */
|
||||
_dpmi_unlockregion(¤tdsp, sizeof(currentdsp));
|
||||
@ -79,52 +79,41 @@ void VGA_exit(dsp) DspInterface dsp;
|
||||
_clearscreen(_GCLEARSCREEN);
|
||||
}
|
||||
|
||||
unsigned long VGA_not_color(dsp) DspInterface dsp;
|
||||
unsigned long VGA_not_color(DspInterface dsp)
|
||||
{
|
||||
printf("Colormode not set!\n");
|
||||
fflush(stdout);
|
||||
return (0);
|
||||
}
|
||||
|
||||
unsigned long VGA_colornum(dsp) DspInterface dsp;
|
||||
unsigned long VGA_colornum(DspInterface dsp)
|
||||
{ /* Return the number of available colors */
|
||||
return (1 << dsp->bitsperpixel);
|
||||
}
|
||||
|
||||
unsigned long VGA_possiblecolors(dsp) DspInterface dsp;
|
||||
unsigned long VGA_possiblecolors(DspInterface dsp)
|
||||
{ return (dsp->colors); }
|
||||
|
||||
void VGA_mono_drawline(dsp, startX, startY, width, height, function, color, thickness, butt, clipX,
|
||||
clipY, clipWidth, clipHeight, dashing) DspInterface dsp;
|
||||
unsigned long startX, startY, width, height;
|
||||
int function;
|
||||
unsigned long color, thickness;
|
||||
int butt;
|
||||
unsigned long clipX, clipY, clipWidth, clipHeight;
|
||||
LispPTR *dashing;
|
||||
|
||||
void VGA_mono_drawline(DspInterface dsp, unsigned long startX, unsiged long startY, unsigned long width, unsigned long height,
|
||||
int function, unsigned long color, unsigned long thickness, int butt,
|
||||
unsigned long clipX, unsigned long clipY, unsigned long clipWidth, unsigned long clipHeight,
|
||||
LispPTR *dashing)
|
||||
{
|
||||
_moveto_w(startX, startY);
|
||||
_lineto_w(width, height);
|
||||
}
|
||||
|
||||
void VGA_color_drawline(dsp, startX, startY, width, height, function, color, thickness, butt, clipX,
|
||||
clipY, clipWidth, clipHeight, dashing) DspInterface dsp;
|
||||
unsigned long startX, startY, width, height;
|
||||
int function;
|
||||
unsigned long color, thickness;
|
||||
int butt;
|
||||
unsigned long clipX, clipY, clipWidth, clipHeight;
|
||||
LispPTR *dashing;
|
||||
void VGA_color_drawline(DspInterface dsp, unsigned long startX, unsiged long startY, unsigned long width, unsigned long height,
|
||||
int function, unsigned long color, unsigned long thickness, int butt,
|
||||
unsigned long clipX, unsigned long clipY, unsigned long clipWidth, unsigned long clipHeight,
|
||||
LispPTR *dashing)
|
||||
|
||||
{}
|
||||
|
||||
void VGA_cleardisplay(dsp) DspInterface dsp;
|
||||
void VGA_cleardisplay(DspInterface dsp)
|
||||
{ _clearscreen(_GCLEARSCREEN); }
|
||||
|
||||
VGA_init(dsp, lispbitmap, width_hint, height_hint, depth_hint) DspInterface dsp;
|
||||
char *lispbitmap;
|
||||
int width_hint, height_hint, depth_hint;
|
||||
VGA_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hint, int depth_hint)
|
||||
{
|
||||
struct videoconfig vc;
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ extern int please_fork;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int lispstringP(Lisp) LispPTR Lisp;
|
||||
int lispstringP(LispPTR Lisp)
|
||||
{
|
||||
switch (((OneDArray *)(Addr68k_from_LADDR(Lisp)))->typenumber) {
|
||||
case THIN_CHAR_TYPENUMBER:
|
||||
@ -165,7 +165,7 @@ LispPTR vmem_save(register char *sysout_file_name);
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
LispPTR vmem_save0(args) register LispPTR *args;
|
||||
LispPTR vmem_save0(LispPTR *args)
|
||||
{
|
||||
register char *def;
|
||||
char pathname[MAXPATHLEN], sysout[MAXPATHLEN], host[MAXNAMLEN];
|
||||
@ -235,15 +235,12 @@ LispPTR vmem_save0(args) register LispPTR *args;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
int twowords(i, j) /* the difference between two DLwords. */
|
||||
DLword *i,
|
||||
*j;
|
||||
int twowords(DLword *i, DLword *j) /* the difference between two DLwords. */
|
||||
{ return (*i - *j); }
|
||||
|
||||
#define FPTOVP_ENTRY (FPTOVP_OFFSET >> 8)
|
||||
|
||||
void sort_fptovp(fptovp, size) DLword *fptovp;
|
||||
int size;
|
||||
void sort_fptovp(DLword *fptovp, int size)
|
||||
{
|
||||
int oldloc, newloc, oldsize, i;
|
||||
DLword *fptr;
|
||||
@ -332,7 +329,7 @@ ONE_MORE_TIME: /* Tacky, but why repeat code? */
|
||||
/* diagnostic flag value to limit the size of write() s */
|
||||
int maxpages = 65536;
|
||||
|
||||
LispPTR vmem_save(sysout_file_name) register char *sysout_file_name;
|
||||
LispPTR vmem_save(char *sysout_file_name)
|
||||
{
|
||||
int sysout; /* SysoutFile descriptor */
|
||||
#ifdef BIGVM
|
||||
|
||||
@ -104,7 +104,7 @@ void Init_XCursor() {
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void Set_XCursor(x, y) int x, y;
|
||||
void Set_XCursor(int x, int y)
|
||||
{
|
||||
/* compare cursor in IOPage memory with cursors we've seen before */
|
||||
register struct MXCURSOR *clp, *clbp;
|
||||
@ -160,7 +160,7 @@ void Set_XCursor(x, y) int x, y;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void init_Xcursor(display, window) Display *display;
|
||||
void init_Xcursor(Display *display, int window)
|
||||
{
|
||||
TPRINT(("TRACE: init_Xcursor()\n"));
|
||||
|
||||
@ -226,10 +226,7 @@ void init_Xcursor(display, window) Display *display;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void set_Xcursor(dsp, bitmap, hotspot_x, hotspot_y, return_cursor, from_lisp) DspInterface dsp;
|
||||
unsigned char *bitmap;
|
||||
int hotspot_x, hotspot_y, from_lisp;
|
||||
Cursor *return_cursor;
|
||||
void set_Xcursor(DspInterface dsp, unsigned char *bitmap, int hotspot_x, int hotspot_y, Cursor *return_cursor, int from_lisp)
|
||||
{
|
||||
extern unsigned char reversedbits[];
|
||||
unsigned char image[32];
|
||||
|
||||
13
src/xinit.c
13
src/xinit.c
@ -92,7 +92,7 @@ extern PFUL clipping_Xbitblt();
|
||||
/* Turn on the X window we've been using for display. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
void init_Xevent(dsp) DspInterface dsp;
|
||||
void init_Xevent(DspInterface dsp)
|
||||
{
|
||||
int GravMask, BarMask, LispMask, DisplayMask;
|
||||
|
||||
@ -129,7 +129,7 @@ void init_Xevent(dsp) DspInterface dsp;
|
||||
/* Turn off the X window we've been using for display. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
void lisp_Xexit(dsp) DspInterface dsp;
|
||||
void lisp_Xexit(DspInterface dsp)
|
||||
{
|
||||
#ifdef SYSVONLY
|
||||
#ifndef LINUX
|
||||
@ -154,7 +154,7 @@ void lisp_Xexit(dsp) DspInterface dsp;
|
||||
/* the X windows we use for Medley's display. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
void Xevent_before_raid(dsp) DspInterface dsp;
|
||||
void Xevent_before_raid(DspInterface dsp)
|
||||
{
|
||||
TPRINT(("TRACE: Xevent_before_raid()\n"));
|
||||
|
||||
@ -180,7 +180,7 @@ void Xevent_before_raid(dsp) DspInterface dsp;
|
||||
/* from the X server in the windows we use for the display. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
void Xevent_after_raid(dsp) DspInterface dsp;
|
||||
void Xevent_after_raid(DspInterface dsp)
|
||||
{
|
||||
init_Xevent(dsp);
|
||||
(dsp->bitblt_to_screen)(dsp, 0, dsp->Vissible.x, dsp->Vissible.y, dsp->Vissible.width,
|
||||
@ -201,7 +201,7 @@ void Xevent_after_raid(dsp) DspInterface dsp;
|
||||
/* */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
void Open_Display(dsp) DspInterface dsp;
|
||||
void Open_Display(DspInterface dsp)
|
||||
{
|
||||
LispReadFds |= (1 << ConnectionNumber(dsp->display_id));
|
||||
#ifndef ISC
|
||||
@ -255,7 +255,8 @@ void Open_Display(dsp) DspInterface dsp;
|
||||
/*********************************************************************/
|
||||
|
||||
DspInterface X_init(DspInterface dsp, char *lispbitmap, int width_hint, int height_hint,
|
||||
int depth_hint) {
|
||||
int depth_hint)
|
||||
{
|
||||
Screen *Xscreen;
|
||||
|
||||
dsp->identifier = Display_Name; /* This is a hack. The display name */
|
||||
|
||||
@ -71,7 +71,7 @@ extern unsigned LispWindowRequestedWidth, LispWindowRequestedHeight;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void Create_LispWindow(dsp) DspInterface dsp;
|
||||
void Create_LispWindow(DspInterface dsp)
|
||||
{
|
||||
XSizeHints szhint = {0};
|
||||
XWMHints Lisp_WMhints = {0};
|
||||
@ -281,7 +281,7 @@ void Create_LispWindow(dsp) DspInterface dsp;
|
||||
XUNLOCK;
|
||||
}
|
||||
|
||||
void lisp_Xvideocolor(flag) int flag;
|
||||
void lisp_Xvideocolor(int flag)
|
||||
{
|
||||
XLOCK;
|
||||
XCopyArea(currentdsp->display_id, currentdsp->DisplayWindow, currentdsp->DisplayWindow,
|
||||
@ -301,7 +301,7 @@ void lisp_Xvideocolor(flag) int flag;
|
||||
|
||||
extern int Current_Hot_X, Current_Hot_Y; /* Cursor hotspot */
|
||||
|
||||
void set_Xmouseposition(x, y) int x, y;
|
||||
void set_Xmouseposition(int x, int y)
|
||||
{
|
||||
int dest_x, dest_y;
|
||||
|
||||
|
||||
@ -43,7 +43,7 @@ extern char iconpixmapfile[1024];
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
Pixmap make_Xicon(dsp) DspInterface dsp;
|
||||
Pixmap make_Xicon(DspInterface dsp)
|
||||
{
|
||||
unsigned int width, height;
|
||||
int value, x_hot, y_hot;
|
||||
|
||||
@ -121,7 +121,7 @@ extern struct sockaddr_nit snit;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void print_Xusage(prog) char *prog;
|
||||
void print_Xusage(char *prog)
|
||||
{
|
||||
fprintf(stderr, " %s options:\n", prog);
|
||||
fprintf(stderr, " [-sysout] [<sysout>] -path to the Medley image\n");
|
||||
@ -151,7 +151,7 @@ void print_Xusage(prog) char *prog;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void print_lispusage(prog) char *prog;
|
||||
void print_lispusage(char *prog)
|
||||
{
|
||||
TPRINT(("TRACE: print_lisp_usage()\n"));
|
||||
|
||||
@ -170,8 +170,7 @@ void print_lispusage(prog) char *prog;
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
void read_Xoption(argc, argv) int *argc;
|
||||
char **argv;
|
||||
void read_Xoption(int *argc, char *argv[])
|
||||
{
|
||||
int bitmask;
|
||||
XrmValue value;
|
||||
|
||||
@ -51,7 +51,7 @@ extern u_char *SUNLispKeyMap;
|
||||
#define MOUSE_RIGHT 14
|
||||
|
||||
/* bound: return b if it is between a and c otherwise it returns a or c */
|
||||
int bound(a, b, c) int a, b, c;
|
||||
int bound(int a, int b, int c)
|
||||
{
|
||||
if (b <= a)
|
||||
return (a);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user