📄 fs.lst
字号:
C51 COMPILER V8.02 FS 10/13/2008 17:11:18 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE FS
OBJECT MODULE PLACED IN .\out\fs.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE fs.c LARGE OPTIMIZE(SIZE) BROWSE DEBUG OBJECTEXTEND PRINT(.\out\fs.lst) OBJ
-ECT(.\out\fs.obj)
line level source
1
2
3 #include "uip.h"
4 #include "httpd.h"
5 #include "fs.h"
6 #include "fsdata.h"
7
8 #define NULL (void *)0
9
10 #ifdef FS_STATISTICS
11 #if FS_STATISTICS == 1
12 static u16_t count[FS_NUMFILES];
13 #endif /* FS_STATISTICS */
14 #endif /* FS_STATISTICS */
15
16 /*-----------------------------------------------------------------------------------*/
17 static u8_t
18 fs_strcmp(const char *str1, const char *str2)
19 {
20 1 u8_t i;
21 1 i = 0;
22 1 loop:
23 1
24 1 if(str2[i] == 0 ||
25 1 str1[i] == '\r' ||
26 1 str1[i] == '\n') {
27 2 return 0;
28 2 }
29 1
30 1 if(str1[i] != str2[i]) {
31 2 return 1;
32 2 }
33 1
34 1
35 1 ++i;
36 1 goto loop;
37 1 }
38 /*-----------------------------------------------------------------------------------*/
39 int
40 fs_open(const char *name, struct fs_file *file)
41 {
42 1 #ifdef FS_STATISTICS
43 1 #if FS_STATISTICS == 1
44 1 u8_t i = 0;
45 1 #endif /* FS_STATISTICS */
46 1 #endif /* FS_STATISTICS */
47 1 struct fsdata_file_noconst *f;
48 1
49 1 for(f = (struct fsdata_file_noconst *)FS_ROOT; f != NULL; f = (struct fsdata_file_noconst *)f->next)
50 1 {
51 2
52 2 if(fs_strcmp(name, f->name) == 0) {
53 3 file->dat = f->dat;
54 3 file->len = f->len;
C51 COMPILER V8.02 FS 10/13/2008 17:11:18 PAGE 2
55 3 #ifdef FS_STATISTICS
56 3 #if FS_STATISTICS == 1
57 3 ++count[i];
58 3 #endif /* FS_STATISTICS */
59 3 #endif /* FS_STATISTICS */
60 3 return 1;
61 3 }
62 2 #ifdef FS_STATISTICS
63 2 #if FS_STATISTICS == 1
64 2 ++i;
65 2 #endif /* FS_STATISTICS */
66 2 #endif /* FS_STATISTICS */
67 2
68 2 }
69 1 return 0;
70 1 }
71 /*-----------------------------------------------------------------------------------*/
72 void
73 fs_init(void)
74 {
75 1 #ifdef FS_STATISTICS
76 1 #if FS_STATISTICS == 1
77 1 u8_t i;
78 1 for(i = 0; i < FS_NUMFILES; i++) {
79 2 count[i] = 0;
80 2 }
81 1 #endif /* FS_STATISTICS */
82 1 #endif /* FS_STATISTICS */
83 1 }
84 /*-----------------------------------------------------------------------------------*/
85 #ifdef FS_STATISTICS
86 #if FS_STATISTICS == 1
87 u16_t fs_count
88 (char *name)
89 {
90 1 struct fsdata_file_noconst *f;
91 1 u8_t i;
92 1
93 1 i = 0;
94 1 for(f = (struct fsdata_file_noconst *)FS_ROOT;
95 1 f != NULL;
96 1 f = (struct fsdata_file_noconst *)f->next) {
97 2
98 2 if(fs_strcmp(name, f->name) == 0) {
99 3 return count[i];
100 3 }
101 2 ++i;
102 2 }
103 1 return 0;
104 1 }
105 #endif /* FS_STATISTICS */
106 #endif /* FS_STATISTICS */
107 /*-----------------------------------------------------------------------------------*/
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 346 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = 28 21
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
C51 COMPILER V8.02 FS 10/13/2008 17:11:18 PAGE 3
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 + -