📄 http.lst
字号:
C51 COMPILER V7.50 HTTP 10/12/2006 15:31:41 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE HTTP
OBJECT MODULE PLACED IN .\Release\Http.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\lib\httpserver\Http.c LARGE OPTIMIZE(9,SIZE) BROWSE ORDER MODDP2 INCD
-IR(..\..\inc\) DEBUG OBJECTEXTEND PRINT(.\Release\Http.lst) OBJECT(.\Release\Http.obj)
line level source
1 /*
2 *
3 * Http.c
4 *
5 * Part of the Myson Century CS620X demo program.
6 *
7 * Authors: LY Lin, WM Wang, IJ Chen, WH Lee
8 *
9 * Http.c contains HTTP server buffer definition and initialize routines.
10 *
11 * This program was developed using the Keil 8051 C uVision 2 system.
12 * The Keil compiler MUST be used if working with Myson Century supplied
13 * firmware.
14 *
15 *
16 * This program must be linked with the 620xlib.LIB library
17 * supplied by Myson Century in object module form.
18 *
19 */
20
21 #include <stdio.h>
22 #include <ctype.h>
23 #include <stdlib.h>
24 #include <string.h>
25
26 #include "hpserver.h"
27 #include "timer.h"
28 #include "ether.h"
29 #include "netutil.h"
30 #include "net.h"
31 #include "ip.h"
32 #include "tcp.h"
33 #include "config.h"
34 #include "http.h"
35 #include "strutil.h"
36
37 /* HTTP and HTML text */
38 xdata char HTTP_OK[] = "HTTP/1.1 200 OK\r\n";
39 xdata char HTTP_NOFILE[] = "HTTP/1.1 404 Not found\r\n";
40 xdata char HTTP_HTM[] = "Content-type: text/html\r\n";
41 xdata char HTTP_TXT[] = "Content-type: text/plain\r\n";
42 xdata char HTTP_GIF[] = "Content-type: image/gif\r\n";
43 xdata char HTTP_JPG[] = "Content-type: image/jpeg\r\n";
44 xdata char HTTP_XBM[] = "Content-type: image/x-xbitmap\r\n";
45 xdata char HTTP_BLANK[] = "\r\n";
46 xdata char EGI_STARTS[] = "<!--#";
47 xdata int EGI_STARTLEN = sizeof (EGI_STARTS) - 1;
48 xdata char EGI_ENDS[] = "-->";
49 xdata int EGI_ENDSLEN = sizeof (EGI_ENDS);
50 xdata char EGI_EXT[] = ".cgi";
51
52 xdata char http_string_fname[] = "fname";
53 xdata int http_string_fname_length = sizeof (http_string_fname) - 1;
54 xdata char http_string_fext[] = "fext";
C51 COMPILER V7.50 HTTP 10/12/2006 15:31:41 PAGE 2
55 xdata int http_string_fext_length = sizeof (http_string_fext) - 1;
56 xdata char http_string_no_egi_function [] = "Can't find EGI function \r\n";
57 xdata int http_string_no_egi_function_length = sizeof (http_string_no_egi_function) - 1;
58
59 xdata int http_varspace; /* Total size of variable space */
60 xdata int http_max_eginame;
61 xdata int http_max_egival;
62
63 /* HTTP server application specific data structure*/
64 APPDATA appdata[NUMBER_OF_HTTP_SOCKETS];
65
66 /* Totol buffer space allocated for the connection variables for all the
67 HTTP server sockets*/
68 xdata char http_varspace_buffer [NUMBER_OF_HTTP_SOCKETS * VARSPACE];
69
70 /************************************************************************
71 /* Function Name : http_init *
72 /* *
73 /* Arguments : *
74 /* None. *
75 /* *
76 /* Return : None. *
77 /* *
78 /* *
79 /* Comment : *
80 /* This function initialize HTTP server.This function must be *
81 /* call first if you want to use web server. *
82 /* *
83 /************************************************************************/
84 char http_init()
85 {
86 1
87 1 APPDATA *adp;
88 1 int i;
89 1
90 1 /* The following three variables are used by routines in connvar.c*/
91 1
92 1 http_varspace = VARSPACE; /* Size of variable space for each socket. */
93 1 http_max_eginame = MAX_EGINAME; /* Max name string length.*/
94 1 http_max_egival = MAX_EGIVAL; /* Max value string length.*/
95 1
96 1 for (i=0,adp = &appdata[0]; i < NUMBER_OF_HTTP_SOCKETS; i++, adp++)
97 1 {
98 2 adp->vars = &http_varspace_buffer [i * VARSPACE];
99 2 /* Initialize the connection variable space */
100 2 }
101 1 Init_HTML_pages(); /*Add by chapar ,init homepages in eeprom and code memory*/
102 1 return 1;
103 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 122 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 1121 5
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -