|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 4349 (0x10fd)
Types: TextFile
Names: »sonnet.h«
└─⟦b20c6495f⟧ Bits:30007238 EUUGD18: Wien-båndet, efterår 1987
└─⟦this⟧ »EUUGD18/General/Sonnet/sonnet.h«
/*
**
** $Header: sonnet.h,v 2.0 89/02/08 16:30:49 rsalz Release1 $
*/
#include <stdio.h>
#include <ctype.h>
#include "patchlog.h"
/* Manifest constants, syntactic sugar. */
#define NLINES 17
#define MAXLEN 80
#define EQ(a, b) (strcmp((a), (b)) == 0)
#define EQn(a, b, n) (strncmp((a), (b), (n)) == 0)
#define DEFAULT_OUT_FILE "sonnet.out"
/* Some fundamental constants of the universe. */
#ifndef TRUE
#define TRUE 1
#endif /* TRUE */
#ifndef FALSE
#define FALSE 0
#endif /* FALSE */
/* Dialectical differences. */
#ifdef USE_INDEX
#define IDX strchr
#define RDX strrchr
#else
#define IDX index
#define RDX rindex
#endif /* USE_INDEX */
/* FOOT TYPES -- index into the Rhythm tables */
#define FT__fill1 0 /* Not used */
#define FT_HF 1 /* ace (Single syllable) */
#define FT_IF 2 /* hurrah (Iambic) */
#define FT_TF 3 /* hollow (Trochaic) */
#define FT__fill2 4 /* Not used */
#define FT_DF 5 /* happily (Dactylic) */
#define FT_AF 6 /* ala mode (Anapestic) */
#define FT_IFF 7 /* resemble */
#define FT_IIF 8 /* establishing */
#define FT_TTF 9 /* education */
#define FT_IIFF 10 /* administration */
#define FT_TDF 11 /* BMW */
#define FT_HIF 12 /* document */
#define FT_TDIF 13 /* opportunity */
/* VOWEL SOUNDS */
#define VS_LA 'A' /* Cambridge (long A) */
#define VS_SA 'a' /* mad (short A) */
#define VS_LE 'E' /* MIT (long E) */
#define VS_SE 'e' /* deaf (short E) */
#define VS_LI 'I' /* bicep (long I) */
#define VS_SI 'i' /* big (short I) */
#define VS_LO 'O' /* bold (long O) */
#define VS_SO 'o' /* bomb (short O) */
#define VS_LU 'U' /* zoo (long U) */
#define VS_SU 'u' /* lunch (short U) */
#define VS_OI 'y' /* oil */
#define VS_OU 'w' /* ouch */
#define VS_ER 'r' /* purgative */
/* You can add your own sounds if you need to. */
/* CONSONANT SOUNDS */
#define CS_SH 'A' /* awash, dish, flesh */
#define CS_ST 'B' /* feast, burst, juiced */
#define CS_CH 'C' /* ouch, slouch, grouch */
#define CS_LD 'D' /* soiled, boiled behold */
#define CS_RD 'E' /* chord, hoard, buzzword */
#define CS_NK 'F' /* junk, pink, crank */
#define CS_NT 'G' /* grunt, insolent, paramount */
#define CS_ND 'H' /* refined, stained, sustained */
#define CS_NG 'I' /* wrong, long, song */
#define CS_NS 'J' /* dense, tense, bounce */
#define CS_MP 'K' /* champ, clamp, clomp */
#define CS_TH 'L' /* south, mouth, rebirth */
#define CS_TS 'M' /* guts, nuts, reports */
#define CS_RT 'N' /* snort, sport, apart */
#define CS_RK 'O' /* work, beserk, arc */
#define CS_CT 'P' /* defunct, cataract, deject */
#define CS_RM 'Q' /* harm, alarm, chloroform */
#define CS_PS 'R' /* corpse, warps, elapse */
#define CS_PT 'S' /* flipped, equipped, flapped */
#define CS_LT 'T' /* insult, occult, salt */
#define CS_SP 'U' /* grasp, rasp, lisp */
#define CS_NZ 'V' /* wrench, stench, brunch */
#define CS_SK 'W' /* risk, tasks, brusque */
#define CS_RS 'X' /* worse, hearse, coarse */
#define CS_NJ 'Y' /* hinge, cringe, munge */
#define CS_FT 'Z' /* cleft, left, thrift */
#define CS_RN '$' /* born, worn, porn */
/* If you add your own consonant sounds, make sure not to use
* the lowercase letters! */
typedef struct _WORDTYPE {
char *Text; /* Text of the word */
short Used; /* Used this word in the search? */
short Foot; /* Foot type (for scanning) */
short vowel; /* Vowel sound (for rhyming) */
short cons; /* Consonant sound (for rhyming) */
} WORDTYPE;
typedef struct _LINETYPE {
short Line; /* Absolute line number */
short Active; /* Text line number */
short Rhyme; /* Rhyme pattern location */
short Marked; /* Save current contents? */
short vowel; /* Vowel rhyme */
short cons; /* Consonant rhyme */
char Text[MAXLEN + 1]; /* Output text */
} LINETYPE;
/* Lint placation */
#define Printf (void)printf
#define Printw (void)printw
#define Fprintf (void)fprintf
#define Sprintf (void)sprintf
#ifdef lint
#undef putchar
#endif /* lint */
/* Linked in later */
extern int optind;
extern char *optarg;
extern char *malloc();
extern char *sprintf();
extern char *strcat();
extern char *IDX();
extern char *RDX();
extern int rand();
extern long time();