1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 15:57:13 +00:00
Nick Briggs 5481a14812 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
2017-06-22 17:31:40 -07:00

122 lines
3.3 KiB
C

/* $Id: misc7.c,v 1.2 1999/01/03 02:07:22 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
static char *id = "$Id: misc7.c,v 1.2 1999/01/03 02:07:22 sybalsky Exp $ Copyright (C) Venue";
/************************************************************************/
/* */
/* (C) Copyright 1989-95 Venue. All Rights Reserved. */
/* Manufactured in the United States of America. */
/* */
/* The contents of this file are proprietary information */
/* belonging to Venue, and are provided to you under license. */
/* They may not be further distributed or disclosed to third */
/* parties without the specific permission of Venue. */
/* */
/************************************************************************/
#include "version.h"
/* misc7.c
*/
#include <stdio.h>
#ifndef DOS
#include <sys/ioctl.h>
#endif /* DOS */
#include "lispemul.h"
#include "lspglob.h"
#include "adr68k.h"
#include "lispmap.h"
#include "lsptypes.h"
#include "emlglob.h"
#include "gc.h"
#include "arith.h"
#include "my.h"
#include "bitblt.h"
#include "dbprint.h"
/* osamu '90/02/08
* add display.h, because in_display_secment() is changed as
* macro. difinition is in display.h
*/
#include "display.h"
#ifndef NOPIXRECT
#include <sunwindow/window_hs.h>
#include <sunwindow/win_ioctl.h>
#include <suntool/sunview.h>
#include <signal.h>
#include <sunwindow/cms_mono.h>
#include <suntool/canvas.h>
#endif
/*************************************************/
/* Possible operation fields for FBITMAPBIT */
/*************************************************/
#define OP_INVERT 0 /* Invert the bit at the given location */
#define OP_ERASE 1 /* Turn the given bit off. */
#define OP_READ 2 /* Just read the bit that's there. */
#define OP_PAINT 3 /* Turn the bit on. */
extern int LispWindowFd;
extern int ScreenLocked;
/*** N_OP_misc7 -- pseudocolor or fbitmapbit ***/
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;
int displayflg;
DBPRINT(("MISC7 op with alpha byte %d.\n", alpha));
if (alpha != 1) ERROR_EXIT(arg7);
base = Addr68k_from_LADDR(arg1);
N_GETNUMBER(arg2, x, doufn);
N_GETNUMBER(arg3, y, doufn);
N_GETNUMBER(arg4, operation, doufn);
N_GETNUMBER(arg5, heightminus1, doufn);
N_GETNUMBER(arg6, rasterwidth, doufn);
DBPRINT(("MISC7 args OK.\n"));
displayflg = n_new_cursorin(base, x, (heightminus1 - y), 1, 1);
base = base + (rasterwidth * (heightminus1 - y)) + (0xFFFF & (x >> 4));
x = 32768 >> (x & 0xF);
oldbit = x & *base;
ScreenLocked = T;
#ifdef SUNDISPLAY
if (displayflg) HideCursor;
#endif /* SUNDISPLAY */
switch (operation) {
case OP_INVERT: *base ^= x; break;
case OP_ERASE: *base &= ~x; break;
case OP_READ: break;
default: *base |= x;
};
#ifdef SUNDISPLAY
#ifdef DISPLAYBUFFER
if (in_display_segment(base)) flush_display_ptrregion(base, 0, 16, 1);
#endif
if (displayflg) ShowCursor;
#endif /* SUNDISPLAY */
#ifdef XWINDOW
if (in_display_segment(base)) flush_display_ptrregion(base, 0, 16, 1);
#endif /* XWINDOW */
ScreenLocked = NIL;
DBPRINT(("FBITMAPBIT old bit = 0x%x.\n", oldbit));
return (S_POSITIVE | (oldbit ? 1 : 0));
doufn:
ERROR_EXIT(arg7);
} /* end N_OP_misc7() */