Difference between revisions of "Peerd.c"
(#include "interface.c") |
(comment includes) |
||
| Line 13: | Line 13: | ||
int main() { | int main() { | ||
| − | #include "file.c" | + | #include "file.c" // Logging and file read/write |
| − | #include "listSpace.c" | + | #include "listSpace.c" // ListSpace function declarations and initialisation |
| − | #include "nodeSpace.c" | + | #include "nodeSpace.c" // NodeSpace function declarations and initialisation |
| − | #include "serialise.c" | + | #include "serialise.c" // Nodal-to-text and visa-versa |
| − | #include "nodalHusk.c" | + | #include "nodalHusk.c" // Actual nodal content and predeclared's |
| − | #include "interface.c" | + | #include "interface.c" // Layer model (currently bitmap/imagemap-based) |
| − | + | #include "server.c" // Server must be last because it never returns | |
| − | // Server must be last because it never returns | ||
| − | |||
int test = deserialise( "testing deserialise:\n\r== can do headings for wiki ==\n*[[7491|Foo]]\n*[[2401|bar]]:[[1928|hello]] # my special association\r\r\n*[[2401|baz]]:[[1328|world]]\n*[[2421|key]]:[[1628]]\n*[[5061|key2]]:[[8928|]]\n*[[2821|key3]]:[[3928|value]]"); | int test = deserialise( "testing deserialise:\n\r== can do headings for wiki ==\n*[[7491|Foo]]\n*[[2401|bar]]:[[1928|hello]] # my special association\r\r\n*[[2401|baz]]:[[1328|world]]\n*[[2421|key]]:[[1628]]\n*[[5061|key2]]:[[8928|]]\n*[[2821|key3]]:[[3928|value]]"); | ||
Revision as of 06:14, 4 July 2006
// prototype of listSpace in c // Licenced under LGPL: www.gnu.org/copyleft/lesser.html
- include <stdlib.h>
- include <stdio.h>
- include <string.h>
// Globals & constants
- define MAXITEMS 10000
int i,j; // global iterators int items = 0; int *space;
int main() {
#include "file.c" // Logging and file read/write #include "listSpace.c" // ListSpace function declarations and initialisation #include "nodeSpace.c" // NodeSpace function declarations and initialisation #include "serialise.c" // Nodal-to-text and visa-versa #include "nodalHusk.c" // Actual nodal content and predeclared's #include "interface.c" // Layer model (currently bitmap/imagemap-based) #include "server.c" // Server must be last because it never returns
int test = deserialise( "testing deserialise:\n\r== can do headings for wiki ==\n*Foo\n*bar:hello # my special association\r\r\n*baz:world\n*key:1628\n*key2:[[8928|]]\n*key3:value"); printf("\n%d list-space items have been created.\n", items);
// Count how many nodes have payloads int p=0; for (i=0; i<MAXITEMS; i++) if (listGetValue(i)) p++; printf("%d items in use:\n", p); for (i=0; i<MAXITEMS; i++) if (j=listGetValue(i)) printf(" %d = %d\n",i,j); printf("\n\n");
}



