996
|
1 cfunge use a special file format to generate fingerprints from.
|
|
2 The format is quite simple. An example follows:
|
|
3
|
|
4 %fingerprint-spec 1.4
|
|
5 %fprint:TEST
|
|
6 %url:http://example.com/desc/test.html
|
|
7 %f109-uri:http://example.com/test
|
|
8 %condition:defined(HAVE_foo) && !defined(__FOOBAR)
|
|
9 %desc:This is a test of the fingerprint spec file system.
|
|
10 %safe:true
|
|
11 %alias:FOOO
|
|
12 %begin-instrs
|
|
13 # a comment
|
|
14 #I name desc
|
|
15 A foobar Description
|
|
16 B quux Other Description
|
|
17 %end
|
|
18
|
|
19 The first line should always be "%fingerprint-spec 1.4" (or in future versions,
|
|
20 possibly higher numbers).
|
|
21
|
|
22 Note:
|
|
23 * The format is case sensitive.
|
|
24 * Any lines after the first starting with a # is considered a comment.
|
|
25
|
|
26 After that fprint, url, desc, safe and alias can follow in any order.
|
|
27 * fprint is the fingerprint name
|
|
28 * url is the url for more info on the fingerprint (docs and such)
|
|
29 * f109-uri is an optional Funge-109 URI for the fingerprint.
|
|
30 * condition is an optional C preprocessor condition. If the line exists it will
|
|
31 be used as an #if condition to enable or disable this fingerprint at compile
|
|
32 time. It is up to you to make sure the condition is sane and valid C.
|
|
33 * desc is a short one line description. Less than 60 chars is definitly
|
|
34 recommended.
|
|
35 * safe can be either true or false, true indicates it is safe in sandbox mode
|
|
36 and false that it isn't.
|
|
37 * alias is special because it is:
|
|
38 * It is optional.
|
|
39 * You can have several.
|
|
40 alias allows a fingerprint to be known under several names. It's use is
|
|
41 highly discouraged. If you really want to use it, you need to work out how
|
|
42 by reading the code.
|
|
43
|
|
44 After that, to indicate that the instruction list begins, use %begin-instrs
|
|
45 The instruction list must be sorted and contain no duplicates.
|
|
46
|
|
47 Each line in this section consists of:
|
|
48 <instruction> whitespace <name for function> whitespace <short description>
|
|
49
|
|
50 * Whitespace consists of one or more tabs and/or spaces.
|
|
51 * The instruction must be in the range A-Z.
|
|
52 * The name should be a valid name to use in a C function name (it is currently
|
|
53 not sanity checked).
|
|
54 * The description is a short string describing the fuction.
|
|
55
|
|
56 Finally there should be a line %end after the instruction list.
|
|
57 Any further lines are ignored (currently, but that may change).
|