mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-27 07:29:29 +00:00
tokenize_asoft: add way to comment out large parts of a program
This commit is contained in:
parent
2d8646f724
commit
b1704c8a13
|
@ -5,7 +5,7 @@
|
|||
#include "version.h"
|
||||
|
||||
/* TODO */
|
||||
/* match lowecase tokens as well as upper case ones */
|
||||
/* match lowercase tokens as well as upper case ones */
|
||||
|
||||
/* Info from http://docs.info.apple.com/article.html?coll=ap&artnum=57 */
|
||||
|
||||
|
@ -176,9 +176,24 @@ int main(int argc, char **argv) {
|
|||
line++;
|
||||
if (line_ptr==NULL) break;
|
||||
|
||||
/* VMW extension, skip between 'if 0 and 'endif */
|
||||
if (line_ptr[0]=='\'') {
|
||||
if (!strncmp(line_ptr,"\'.if 0",6)) {
|
||||
while(1) {
|
||||
line_ptr=fgets(input_line,BUFSIZ,stdin);
|
||||
line++;
|
||||
if (line_ptr==NULL) break;
|
||||
if (!strncmp(line_ptr,"\'.endif",7)) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (line_ptr==NULL) break;
|
||||
|
||||
/* VMW extension: use leading ' as a comment char */
|
||||
if (line_ptr[0]=='\'') continue;
|
||||
|
||||
|
||||
|
||||
/* skip empty lines */
|
||||
if (line_ptr[0]=='\n') continue;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user