Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92 » !AWJUL92/Goodies/work/h/lexical

!AWJUL92/Goodies/work/h/lexical

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199207.adf » !AWJULY92
Filename: !AWJUL92/Goodies/work/h/lexical
Read OK:
File size: 028A bytes
Load address: 0000
Exec address: 0000
File contents
/*  Lexical Functions Header File.        */
/*  Archimedes World, October 1991.       */


#ifndef _lexical
#define _lexical


/*  Header files required.     */

#include <stdio.h>


/* Constant Definitions.       */

#define STRLEN 16
#define NULL    0

/* Variable type definitions.  */

typedef char string[STRLEN+1];
typedef struct word_struct *word;


/* Function declarations.      */

extern void ToUpperCase( char *word );
extern void ToLowerCase( char *word );
extern int  GetWord( char *buffer, int length, FILE *stream );
extern void StoreWord( char *str, word *list );
extern void ListWords( FILE *f, word list, int repeats );


#endif

00000000  2f 2a 20 20 4c 65 78 69  63 61 6c 20 46 75 6e 63  |/*  Lexical Func|
00000010  74 69 6f 6e 73 20 48 65  61 64 65 72 20 46 69 6c  |tions Header Fil|
00000020  65 2e 20 20 20 20 20 20  20 20 2a 2f 0a 2f 2a 20  |e.        */./* |
00000030  20 41 72 63 68 69 6d 65  64 65 73 20 57 6f 72 6c  | Archimedes Worl|
00000040  64 2c 20 4f 63 74 6f 62  65 72 20 31 39 39 31 2e  |d, October 1991.|
00000050  20 20 20 20 20 20 20 2a  2f 0a 0a 0a 23 69 66 6e  |       */...#ifn|
00000060  64 65 66 20 5f 6c 65 78  69 63 61 6c 0a 23 64 65  |def _lexical.#de|
00000070  66 69 6e 65 20 5f 6c 65  78 69 63 61 6c 0a 0a 0a  |fine _lexical...|
00000080  2f 2a 20 20 48 65 61 64  65 72 20 66 69 6c 65 73  |/*  Header files|
00000090  20 72 65 71 75 69 72 65  64 2e 20 20 20 20 20 2a  | required.     *|
000000a0  2f 0a 0a 23 69 6e 63 6c  75 64 65 20 3c 73 74 64  |/..#include <std|
000000b0  69 6f 2e 68 3e 0a 0a 0a  2f 2a 20 43 6f 6e 73 74  |io.h>.../* Const|
000000c0  61 6e 74 20 44 65 66 69  6e 69 74 69 6f 6e 73 2e  |ant Definitions.|
000000d0  20 20 20 20 20 20 20 2a  2f 0a 0a 23 64 65 66 69  |       */..#defi|
000000e0  6e 65 20 53 54 52 4c 45  4e 20 31 36 0a 23 64 65  |ne STRLEN 16.#de|
000000f0  66 69 6e 65 20 4e 55 4c  4c 20 20 20 20 30 0a 0a  |fine NULL    0..|
00000100  2f 2a 20 56 61 72 69 61  62 6c 65 20 74 79 70 65  |/* Variable type|
00000110  20 64 65 66 69 6e 69 74  69 6f 6e 73 2e 20 20 2a  | definitions.  *|
00000120  2f 0a 0a 74 79 70 65 64  65 66 20 63 68 61 72 20  |/..typedef char |
00000130  73 74 72 69 6e 67 5b 53  54 52 4c 45 4e 2b 31 5d  |string[STRLEN+1]|
00000140  3b 0a 74 79 70 65 64 65  66 20 73 74 72 75 63 74  |;.typedef struct|
00000150  20 77 6f 72 64 5f 73 74  72 75 63 74 20 2a 77 6f  | word_struct *wo|
00000160  72 64 3b 0a 0a 0a 2f 2a  20 46 75 6e 63 74 69 6f  |rd;.../* Functio|
00000170  6e 20 64 65 63 6c 61 72  61 74 69 6f 6e 73 2e 20  |n declarations. |
00000180  20 20 20 20 20 2a 2f 0a  0a 65 78 74 65 72 6e 20  |     */..extern |
00000190  76 6f 69 64 20 54 6f 55  70 70 65 72 43 61 73 65  |void ToUpperCase|
000001a0  28 20 63 68 61 72 20 2a  77 6f 72 64 20 29 3b 0a  |( char *word );.|
000001b0  65 78 74 65 72 6e 20 76  6f 69 64 20 54 6f 4c 6f  |extern void ToLo|
000001c0  77 65 72 43 61 73 65 28  20 63 68 61 72 20 2a 77  |werCase( char *w|
000001d0  6f 72 64 20 29 3b 0a 65  78 74 65 72 6e 20 69 6e  |ord );.extern in|
000001e0  74 20 20 47 65 74 57 6f  72 64 28 20 63 68 61 72  |t  GetWord( char|
000001f0  20 2a 62 75 66 66 65 72  2c 20 69 6e 74 20 6c 65  | *buffer, int le|
00000200  6e 67 74 68 2c 20 46 49  4c 45 20 2a 73 74 72 65  |ngth, FILE *stre|
00000210  61 6d 20 29 3b 0a 65 78  74 65 72 6e 20 76 6f 69  |am );.extern voi|
00000220  64 20 53 74 6f 72 65 57  6f 72 64 28 20 63 68 61  |d StoreWord( cha|
00000230  72 20 2a 73 74 72 2c 20  77 6f 72 64 20 2a 6c 69  |r *str, word *li|
00000240  73 74 20 29 3b 0a 65 78  74 65 72 6e 20 76 6f 69  |st );.extern voi|
00000250  64 20 4c 69 73 74 57 6f  72 64 73 28 20 46 49 4c  |d ListWords( FIL|
00000260  45 20 2a 66 2c 20 77 6f  72 64 20 6c 69 73 74 2c  |E *f, word list,|
00000270  20 69 6e 74 20 72 65 70  65 61 74 73 20 29 3b 0a  | int repeats );.|
00000280  0a 0a 23 65 6e 64 69 66  0a 0a                    |..#endif..|
0000028a