mirror of
https://github.com/adamdunkels/ubasic.git
synced 2026-11-21 20:19:45 +00:00
Fix line ending for windows
This commit is contained in:
parent
1607012cdd
commit
e7fc68e89e
5 changed files with 44 additions and 6 deletions
13
.vscode/launch.json
vendored
Normal file
13
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "(Windows) Attach",
|
||||||
|
"type": "cppvsdbg",
|
||||||
|
"request": "attach",
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
28
.vscode/tasks.json
vendored
Normal file
28
.vscode/tasks.json
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "cppbuild",
|
||||||
|
"label": "C/C++: cl.exe build active file",
|
||||||
|
"command": "cl.exe",
|
||||||
|
"args": [
|
||||||
|
"/Zi",
|
||||||
|
"/EHsc",
|
||||||
|
"/nologo",
|
||||||
|
"/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
|
||||||
|
"${file}"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "${fileDirname}"
|
||||||
|
},
|
||||||
|
"problemMatcher": [
|
||||||
|
"$msCompile"
|
||||||
|
],
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
},
|
||||||
|
"detail": "Task generated by Debugger."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": "2.0.0"
|
||||||
|
}
|
||||||
|
|
@ -28,12 +28,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* Modified to support simple string variables and functions by David Mitchell
|
|
||||||
* November 2008.
|
|
||||||
* Changes and additions are marked 'string additions' throughout
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "ubasic.h"
|
#include "ubasic.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,8 @@ singlechar(void)
|
||||||
{
|
{
|
||||||
if(*ptr == '\n') {
|
if(*ptr == '\n') {
|
||||||
return TOKENIZER_CR;
|
return TOKENIZER_CR;
|
||||||
|
} else if(*ptr == '\r'){
|
||||||
|
return TOKENIZER_LF;
|
||||||
} else if(*ptr == ',') {
|
} else if(*ptr == ',') {
|
||||||
return TOKENIZER_COMMA;
|
return TOKENIZER_COMMA;
|
||||||
} else if(*ptr == ';') {
|
} else if(*ptr == ';') {
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,7 @@ enum {
|
||||||
TOKENIZER_GT,
|
TOKENIZER_GT,
|
||||||
TOKENIZER_EQ,
|
TOKENIZER_EQ,
|
||||||
TOKENIZER_CR,
|
TOKENIZER_CR,
|
||||||
|
TOKENIZER_LF
|
||||||
};
|
};
|
||||||
|
|
||||||
void tokenizer_goto(const char *program);
|
void tokenizer_goto(const char *program);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue