1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-26 11:52:25 +00:00

Reformat all C source files with Clang-format in Google style w/ 100 col width.

This commit is contained in:
Nick Briggs
2017-05-28 18:08:18 -07:00
parent 691645d048
commit 156c3292f8
167 changed files with 40520 additions and 48069 deletions

64
src/xscroll.c Executable file → Normal file
View File

@@ -1,8 +1,7 @@
/* $Id: xscroll.c,v 1.2 1999/01/03 02:07:48 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
/* $Id: xscroll.c,v 1.2 1999/01/03 02:07:48 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved
*/
static char *id = "$Id: xscroll.c,v 1.2 1999/01/03 02:07:48 sybalsky Exp $ Copyright (C) Venue";
/************************************************************************/
/* */
/* (C) Copyright 1989, 1990, 1990, 1991, 1992, 1993, 1994, 1995 Venue. */
@@ -18,7 +17,6 @@ static char *id = "$Id: xscroll.c,v 1.2 1999/01/03 02:07:48 sybalsky Exp $ Copyr
#include "version.h"
#include <stdio.h>
#include <X11/Xlib.h>
@@ -30,13 +28,11 @@ static char *id = "$Id: xscroll.c,v 1.2 1999/01/03 02:07:48 sybalsky Exp $ Copyr
int ScrollPitch = SCROLL_PITCH;
/* Move the DisplayWindow and the ScrollButtons to a new */
/* position. newX, newY refers to the uppre left corner */
/* of the LispDisplay */
void Scroll( dsp, newX, newY)
DspInterface dsp;
int newX, newY;
void Scroll(dsp, newX, newY) DspInterface dsp;
int newX, newY;
{
/* Limit the newX and newY values. */
dsp->Vissible.x = bound(0, newX, dsp->Display.width - dsp->Vissible.width);
@@ -45,45 +41,27 @@ void Scroll( dsp, newX, newY)
newX = (int)((dsp->Vissible.x * dsp->Vissible.width) / dsp->Display.width);
newY = (int)((dsp->Vissible.y * dsp->Vissible.height) / dsp->Display.height);
XMoveWindow( dsp->display_id, dsp->HorScrollButton, newX, -dsp->InternalBorderWidth);
XMoveWindow( dsp->display_id, dsp->VerScrollButton, -dsp->InternalBorderWidth, newY );
XMoveWindow(dsp->display_id, dsp->HorScrollButton, newX, -dsp->InternalBorderWidth);
XMoveWindow(dsp->display_id, dsp->VerScrollButton, -dsp->InternalBorderWidth, newY);
(dsp->bitblt_to_screen)( dsp, 0, dsp->Vissible.x, dsp->Vissible.y,
dsp->Vissible.width, dsp->Vissible.height);
}/* end Scroll */
(dsp->bitblt_to_screen)(dsp, 0, dsp->Vissible.x, dsp->Vissible.y, dsp->Vissible.width,
dsp->Vissible.height);
} /* end Scroll */
void JumpScrollVer( dsp, y )
DspInterface dsp;
{
Scroll( dsp, dsp->Vissible.x, (int)((dsp->Display.width *y) / dsp->Vissible.height));
}
void JumpScrollVer(dsp, y) DspInterface dsp;
{ Scroll(dsp, dsp->Vissible.x, (int)((dsp->Display.width * y) / dsp->Vissible.height)); }
void JumpScrollHor( dsp, x )
DspInterface dsp;
{
Scroll( dsp, (int)((dsp->Display.width *x) / dsp->Vissible.width), dsp->Vissible.y);
}
void JumpScrollHor(dsp, x) DspInterface dsp;
{ Scroll(dsp, (int)((dsp->Display.width * x) / dsp->Vissible.width), dsp->Vissible.y); }
void ScrollLeft( dsp )
DspInterface dsp;
{
Scroll( dsp, dsp->Vissible.x - ScrollPitch, dsp->Vissible.y);
}
void ScrollLeft(dsp) DspInterface dsp;
{ Scroll(dsp, dsp->Vissible.x - ScrollPitch, dsp->Vissible.y); }
void ScrollRight( dsp )
DspInterface dsp;
{
Scroll( dsp, dsp->Vissible.x + ScrollPitch, dsp->Vissible.y);
}
void ScrollRight(dsp) DspInterface dsp;
{ Scroll(dsp, dsp->Vissible.x + ScrollPitch, dsp->Vissible.y); }
void ScrollUp( dsp )
DspInterface dsp;
{
Scroll( dsp, dsp->Vissible.x, dsp->Vissible.y - ScrollPitch);
}
void ScrollUp(dsp) DspInterface dsp;
{ Scroll(dsp, dsp->Vissible.x, dsp->Vissible.y - ScrollPitch); }
void ScrollDown( dsp )
DspInterface dsp;
{
Scroll( dsp, dsp->Vissible.x, dsp->Vissible.y + ScrollPitch);
}
void ScrollDown(dsp) DspInterface dsp;
{ Scroll(dsp, dsp->Vissible.x, dsp->Vissible.y + ScrollPitch); }