home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
PRINTING
/
PSFIX.ZIP
/
STRLIB.H
< prev
next >
Wrap
C/C++ Source or Header
|
1991-03-28
|
3KB
|
163 lines
/*
*
* include file for strlib.c
*
*/
/*
* This software may be freely distributed under the following conditions:
* 1. It is distributed in its current form, without alterations.
* 2. No monetary profit is made, under any circumstances.
*
* Marc A. Murison
* Smithsonian Astrophysical Observatory
* 60 Garden Street, MS 63
* Cambridge, MA 02138
*
* (617) 495-7079 murison@cfacx2.harvard.edu
*/
#ifndef STRLIB_H
#define STRLIB_H
#include "mydefs.h"
#ifdef STRLIB_C /* stuff specific to strlib.c only */
#ifndef STDIO_H
#define STDIO_H
#include <stdio.h>
#endif
#ifndef STDLIB_H
#define STDLIB_H
#include <stdlib.h>
#endif
#ifndef STRING_H
#define STRING_H
#include <string.h>
#endif
#ifndef CTYPE_H
#define CTYPE_H
#include <ctype.h>
#endif
#ifndef STDARG_H
#define STDARG_H
#include <stdarg.h>
#endif
#if __MSDOS__
#ifndef DOS_H
#define DOS_H
#include <dos.h>
#endif
#ifndef CONIO_H
#define CONIO_H
#include <conio.h>
#endif
#endif
#include "vectdef.h"
#define TEXT_ROWS 25 /* rows per screenful */
/* valid key check for browse */
#define BROWSE_KEY( extended, c ) \
( \
(extended) || /* any extended key */ \
( /* valid normal keys: */ \
(c) == KEY_CR || \
(c) == KEY_SP || \
( /* quit keys: */ \
(c) != KEY_ESCAPE && \
(c) != KEY_q && \
(c) != KEY_Q \
) \
) \
)
/* macros for next_word and next_word_num */
#define WORD_CHAR( c ) ( isalnum(c) || (c) == '_' )
#define WORD_NUM_CHAR( c ) ( isalnum(c) || \
(c) == '_' || (c) == PERIOD || \
(c) == PLUS || (c) == MINUS )
#endif /* stuff specific to strlib.c */
/* tab structure */
typedef struct { long ntabs, nspaces; } Tab_Info;
/* strlib.c function prototypes */
#if __MSDOS__
Boolean browse( char *text, char *title );
void cprint_line( int crlf, char **text_ptr );
#endif
Boolean next_line( char **bp );
Boolean prev_line( char **bp, char *buffer );
Boolean beg_line( char **bp, char *buffer );
Boolean end_line( char **bp );
void announce( char *version_string, char *date_string );
char *upcase( char *string );
char *dncase( char *string );
char *itoh( int i, char *string );
char *ltoh( long i, char *string );
char itohc( int i );
char *sflip( char *string );
char *ljust( char *sp );
Tab_Info expand_tabs( int n, char *in_ptr, char *out_ptr, long maxchars );
Boolean next_word( char **bp, char *word, int *n );
Boolean next_word_num( char **bp, char *word, int *n );
Boolean is_blank( char *string );
void print_msg( Boolean nextline, Boolean lineafter, int n, ... );
void moreprint( char *string );
char moreprint_pause( char *msg );
void print_line(int crlf, char **text_ptr );
ulong append_buff( char *source_buff, ulong N, char *dest_buff );
#ifndef NO_FLOAT
void parse_args(char string[], int *nargs, double args[] );
#endif
#endif