home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff329.lzh
/
DiskSpeed
/
MakeBoxes.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-02
|
4KB
|
140 lines
/*
* DiskSpeed v3.0
* by
* Michael Sinz
*
* Copyright (c) 1989 by MKSoft Development
*
* MKSoft Development
* 163 Appledore Drive
* Downingtown, PA 19335
*
* Yes, this is yet another disk speed testing program, but with a few
* differences. It was designed to give the most accurate results of the
* true disk performance in the system. For this reason many of
* DiskSpeed's results may look either lower or higher than current disk
* performance tests.
*
* This program was thrown together in a few hours because I needed more
* accurate and consistent results for disk performance as seen from the
* application's standpoint. This program has now served its purpose and
* I am now giving it to the rest of the Amiga world to play with as long
* as all of the files remain together in unmodified form. (That is, the
* files DiskSpeed, DiskSpeed.info, DiskSpeed.c, DiskSpeedWindow.c,
* DiskSpeedWindow.h, MakeBoxes.c, MakeBoxes.h, StandardGadgets.c,
* StandardGadgets.h, RenderInfo.c, RenderInfo.h, DiskSpeed.doc, and
* MakeFile)
*
* Version 2.0 of this program added a few features and cleaned up the
* user interface. I hope you like this...
*
* Version 3.0 of this program added the performance stress and cleaned up
* some parts of the older code. (Fix to RenderInfo.c)
*
******************************************************************************
* *
* Reading legal mush can turn your brain into guacamole! *
* *
* So here is some of that legal mush: *
* *
* Permission is hereby granted to distribute this program's source *
* executable, and documentation for non-commercial purposes, so long as the *
* copyright notices are not removed from the sources, executable or *
* documentation. This program may not be distributed for a profit without *
* the express written consent of the author Michael Sinz. *
* *
* This program is not in the public domain. *
* *
* Fred Fish is expressly granted permission to distribute this program's *
* source and executable as part of the "Fred Fish freely redistributable *
* Amiga software library." *
* *
* Permission is expressly granted for this program and it's source to be *
* distributed as part of the Amicus Amiga software disks, and the *
* First Amiga User Group's Hot Mix disks. *
* *
******************************************************************************
*
* Make border structures with the correct box info...
*/
#include <exec/types.h>
#include <intuition/intuition.h>
#include "MakeBoxes.h"
/*
* Note: The routines do fill in the '0' values even though
* the array was, most likely, already zero'd
*/
/*
* This function makes a top-left border array based on the
* x/y size of the box...
*/
VOID FillTopLeft_Border(struct Border *bd,SHORT xSize,SHORT ySize)
{
register SHORT *xy;
xy=bd->XY;
xy[0]=xSize-2; xy[1]=0;
xy[2]=0; xy[3]=0;
xy[4]=0; xy[5]=ySize-1;
xy[6]=1; xy[7]=ySize-2;
xy[8]=1; xy[9]=1;
}
/*
* This function makes a bottom-right border array based on the
* x/y size of the box...
*/
VOID FillBottomRight_Border(struct Border *bd,SHORT xSize,SHORT ySize)
{
register SHORT *xy;
xy=bd->XY;
xy[0]=1; xy[1]=ySize-1;
xy[2]=xSize-1; xy[3]=ySize-1;
xy[4]=xSize-1; xy[5]=0;
xy[6]=xSize-2; xy[7]=1;
xy[8]=xSize-2; xy[9]=ySize-2;
}
/*
* This function make a top-left double border array based on the
* x/y size of the box...
*/
VOID FillTopLeftDouble_Border(struct Border *bd,SHORT xSize,SHORT ySize)
{
register SHORT *xy;
xy=bd->XY;
xy[ 0]=0; xy[ 1]=ySize-1;
xy[ 2]=0; xy[ 3]=0;
xy[ 4]=xSize-2; xy[ 5]=0;
xy[ 6]=xSize-3; xy[ 7]=1;
xy[ 8]=1; xy[ 9]=1;
xy[10]=1; xy[11]=ySize-2;
xy[12]=2; xy[13]=ySize-3;
xy[14]=2; xy[15]=2;
}
/*
* This function makes a bottom-right double border array based on the
* x/y size of the box...
*/
VOID FillBottomRightDouble_Border(struct Border *bd,SHORT xSize,SHORT ySize)
{
register SHORT *xy;
xy=bd->XY;
xy[ 0]=xSize-1; xy[ 1]=0;
xy[ 2]=xSize-1; xy[ 3]=ySize-1;
xy[ 4]=1; xy[ 5]=ySize-1;
xy[ 6]=2; xy[ 7]=ySize-2;
xy[ 8]=xSize-2; xy[ 9]=ySize-2;
xy[10]=xSize-2; xy[11]=1;
xy[12]=xSize-3; xy[13]=2;
xy[14]=xSize-3; xy[15]=ySize-3;
}