File: dadadodo.h

package info (click to toggle)
dadadodo 1.04-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 160 kB
  • ctags: 191
  • sloc: ansic: 2,443; makefile: 150; sh: 118
file content (41 lines) | stat: -rw-r--r-- 1,013 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* DadaDodo, Copyright (c) 1997 Jamie Zawinski <jwz@jwz.org>
 *
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that
 * copyright notice and this permission notice appear in supporting
 * documentation.  No representations are made about the suitability of this
 * software for any purpose.  It is provided "as is" without express or 
 * implied warranty.
 */

/*#if sizeof(int) >= 4*/
typedef int int32;
typedef unsigned int uint32;
/*#else
typedef long int32;
typedef unsigned long uint32;
#endif*/

typedef struct word word;
typedef struct word_link word_link;

struct word {
  int string;
  int count;
  int start;
  int cap;
  int comma;
  int period;
  int quem;
  int bang;
  int succ_length, pred_length;
  word_link *succ, *pred;
};

struct word_link {
  int count;
  int word;
};

#define RAND(N) ((random() & 0x7FFFFFFF) % (N))