1 #ifndef _WWW_H 2 #define _WWW_H 3 4 /* 5 WWWHOST: Host where WWW scores are stored 6 */ 7 #ifndef WWWHOST 8 #define WWWHOST "xsokoban.lcs.mit.edu" 9 #endif 10 11 /* 12 WWWPORT: Port at WWWHOST 13 */ 14 #ifndef WWWPORT 15 #define WWWPORT 80 16 #endif 17 18 /* 19 WWWSCOREPATH: Path to access in order to store scores. $L means the 20 current level number, $M is the string of moves, $U is the user name, 21 $N is the length of the string of moves. 22 */ 23 #ifndef WWWSCORECOMMAND 24 #define WWWSCORECOMMAND "POST /cgi-bin/xsokoban/solve?$L,$U HTTP/1.0\n" \ 25 "Content-type: text/plain\n" \ 26 "Content-length: $N\n" \ 27 "\n" \ 28 "$M\n" 29 #endif 30 31 #ifndef WWWREADSCORECMD 32 #define WWWREADSCORECMD "GET /cgi-bin/xsokoban/scores HTTP/1.0\n\n" 33 #endif 34 35 /* 36 WWWSCREENPATH: Path to access in order to get screen files. $L 37 means the requested level number. Not currently used. 38 */ 39 #ifndef WWWSCREENPATH 40 #define WWWSCREENPATH "GET /cgi-bin/xsokoban/screen?level=$L HTTP/1.0\n\n" 41 #endif 42 43 /* 44 WWWGETLEVELPATH: Path to access in order to get a user's level. $U 45 is the user name. 46 */ 47 #ifndef WWWGETLEVELPATH 48 #define WWWGETLEVELPATH "GET /cgi-bin/xsokoban/user-level?user=$U HTTP/1.0\n\n" 49 #endif 50 51 /* 52 WWWGETLINESPATH: Path to access in order to get a section of the 53 score file by line number. The first %d is substituted with "line1", 54 the second with "line2". 55 */ 56 #ifndef WWWGETLINESPATH 57 #define WWWGETLINESPATH \ 58 "GET /cgi-bin/xsokoban/score-lines?user=$U,line1=%d,line2=%d HTTP/1.0\n\n" 59 #endif 60 61 /* 62 WWWGETSCORELEVELPATH: Path to access in order to get a section of the 63 score file by line number. The first %d is substituted with "line1", 64 the second with "line2". 65 */ 66 #ifndef WWWGETSCORELEVELPATH 67 #define WWWGETSCORELEVELPATH \ 68 "GET /cgi-bin/xsokoban/score-level?user=$U,level=$L HTTP/1.0\n\n" 69 #endif 70 71 72 #endif /* _WWW_H */ 73