File: doConstants.c

package info (click to toggle)
pilot-link 0.8.7-2
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,256 kB
  • ctags: 3,233
  • sloc: ansic: 24,039; java: 2,162; cpp: 1,641; sh: 1,585; makefile: 1,363; perl: 723; yacc: 660; python: 239; tcl: 14
file content (71 lines) | stat: -rw-r--r-- 1,105 bytes parent folder | download | duplicates (2)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#include <stdio.h>
#include "pi-source.h"
#include "pi-dlp.h"
#include "pi-socket.h"

FILE * f;

void w(char * name, int value) {
	fprintf(f, "	public static int %s = %d;\n", name, value);
}

#define W(x) w(#x, x);

int main(int argc, char*argv[]) {
	f = fopen("Pdapilot/constants.java", "w");
	
	fprintf(f, "\

package Pdapilot;

public class constants {
");

	W(dlpDBFlagResource)
	W(dlpDBFlagReadOnly)
	W(dlpDBFlagAppInfoDirty)
	W(dlpDBFlagBackup)
	W(dlpDBFlagOpen)
	W(dlpDBFlagNewer)
	W(dlpDBFlagReset)
	
	W(dlpRecAttrDeleted)
	W(dlpRecAttrDirty)
	W(dlpRecAttrBusy)
	W(dlpRecAttrSecret)
	W(dlpRecAttrArchived)
	
	W(dlpOpenRead)
	W(dlpOpenWrite)
	W(dlpOpenExclusive)
	W(dlpOpenSecret)
	W(dlpOpenReadWrite)
	
	W(dlpEndCodeNormal)
	W(dlpEndCodeOutOfMemory)
	W(dlpEndCodeUserCan)
	W(dlpEndCodeOther)
	
	W(dlpDBListRAM)
	W(dlpDBListROM)
	
	W(PILOT_LINK_VERSION)
	W(PILOT_LINK_MAJOR)
	W(PILOT_LINK_MINOR)
	
	W(PI_AF_SLP)
	W(PI_AF_INETSLP)
	W(PI_PF_SLP)
	W(PI_PF_PADP)
	W(PI_PF_LOOP)
	W(PI_SOCK_STREAM)
	W(PI_SOCK_DGRAM)
	W(PI_SOCK_RAW)
	W(PI_SOCK_SEQPACKET)

	W(AF_INET)

	fprintf(f, "}\n");
	
	return 0;
}