home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Meeting Pearls 3
/
Meeting_Pearls_III.iso
/
Pearls
/
midi
/
Editors_and_Tools
/
OberSuite-1.03
/
src
/
parse.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-23
|
2KB
|
52 lines
/**************************************************************************
* parse.c: General functions for the command-line user interface.
* A part of OberSuite for the Commodore Amiga.
*
* Author: Daniel Barrett, barrett@cs.umass.edu.
* Version: 1.0.
* Copyright: None! This program is in the Public Domain.
* Please share it with others.
***************************************************************************/
#include "decl.h"
#include "oberheim.h"
/***************************************************************************
* Does the given value fall between "low" and "high", inclusive?
***************************************************************************/
int Between(int value, int low, int high)
{
return ((value >= low) && (value <= high));
}
/***************************************************************************
* Return TRUE if and only if the string "str" consists only of digits.
***************************************************************************/
BOOL AllDigits(char *str)
{
if ((!str) || (*str == '\0')) /* NULL or empty string. */
return(FALSE);
else
while (*str) /* For each character... */
if (!isdigit(*str)) /* if not a digit... */
return(FALSE); /* goodbye! */
else
str++;
return(TRUE); /* All were digits. */
}
/***************************************************************************
* We are not using the Workbench interface, so we can save a little space
* by replacing the system's _wb_parse() function with a stub.
***************************************************************************/
void _wb_parse()
{
/* Stub: we don't need WB startup code. */
}