Subversion Repositories NedoOS

Rev

Rev 1865 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log

Rev 1865 Rev 1875
Line 112... Line 112...
112
                call    prtext
112
                call    prtext
113
                ld      hl,[name_ptr]
113
                ld      hl,[name_ptr]
114
                call    prtext
114
                call    prtext
115
                ld      hl,help_msg2
115
                ld      hl,help_msg2
116
                call    prtext
116
                call    prtext
-
 
117
                ld      hl,CS_NAME
-
 
118
                call    prtext
-
 
119
                ld      hl,help_msg3
-
 
120
                call    prtext
117
                jr      successful_exit
121
                jr      successful_exit
118
 
122
 
119
 
123
 
120
.arg_chk        ;check mode
124
.arg_chk        ;check mode
121
 
125
 
Line 183... Line 187...
183
                ld      [hl],a
187
                ld      [hl],a
184
                inc     hl
188
                inc     hl
185
                djnz    .chksum_loop
189
                djnz    .chksum_loop
186
                ld      [hl],0
190
                ld      [hl],0
187
 
191
 
188
                ;parse two spaces
192
                ;parse >=1 spaces
-
 
193
                call    my_getc
-
 
194
                jr      c,.line_unexp_end2
189
                ld      b,2
195
                cp      ' '
-
 
196
                jr      nz,.line_format_error
190
.chkspc_loop
197
.chkspc_loop
191
                call    my_getc
198
                call    my_getc
-
 
199
.line_unexp_end2
192
                jr      c,.line_unexp_end
200
                jr      c,.line_unexp_end
193
                cp      ' '
201
                cp      ' '
194
                jr      nz,.line_format_error
202
                jr      z,.chkspc_loop
195
                djnz    .chkspc_loop
203
                call    my_ungetc
-
 
204
 
-
 
205
 
196
 
206
 
197
                ;parse filepath/name
207
                ;parse filepath/name
198
                ld      b,MAXPATH_sz&255 ;now it is 256
208
                ld      b,MAXPATH_sz&255 ;now it is 256
199
                ld      hl,FNAME
209
                ld      hl,FNAME
200
.chkfname_loop
210
.chkfname_loop
Line 554... Line 564...
554
                org     CONTINUE
564
                org     CONTINUE
555
                db      13,10
565
                db      13,10
556
 
566
 
557
                db      "Usage: ",0
567
                db      "Usage: ",0
558
help_msg2:      db      " [OPTION] [FILE]...",13,10
568
help_msg2:      db      " [OPTION] [FILE]...",13,10
-
 
569
                db      "Print ",0
559
                db      "Print CRC-32 (0xEDB88320) checksums.",13,10,13,10
570
help_msg3:      db      " checksums.",13,10,13,10
560
                db      "When filename is -, read standard input.",13,10
571
                db      "When filename is -, read standard input.",13,10
561
                db      "Options:",13,10
572
                db      "Options:",13,10
562
                db      "  -c   read CRCs from the FILE(s), but not stdin, and check them.",13,10
573
                db      "  -c   read checksums from the FILE(s) (but not stdin) and check them.",13,10
563
                db      "       file format: ^<CRC><space><space><filename><EOL>",13,10
574
                db      "       file format: ^<CHKSUM><spaces><filename><EOL>",13,10
564
                db      "  -h   display this help and exit",13,10
575
                db      "  -h   display this help and exit",13,10
565
                db      13,10
576
                db      13,10
566
                db      0
577
                db      0
567
 
578
 
568
stdin_arg:      db      "-",0
579
stdin_arg:      db      "-",0