Fix line ending for windows

This commit is contained in:
Jeremy Green 2025-09-02 21:01:56 +01:00
parent 1607012cdd
commit e7fc68e89e
5 changed files with 44 additions and 6 deletions

13
.vscode/launch.json vendored Normal file
View 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
View 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"
}

View file

@ -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 <stdio.h>
#include <errno.h>

View file

@ -80,6 +80,8 @@ singlechar(void)
{
if(*ptr == '\n') {
return TOKENIZER_CR;
} else if(*ptr == '\r'){
return TOKENIZER_LF;
} else if(*ptr == ',') {
return TOKENIZER_COMMA;
} else if(*ptr == ';') {

View file

@ -70,6 +70,7 @@ enum {
TOKENIZER_GT,
TOKENIZER_EQ,
TOKENIZER_CR,
TOKENIZER_LF
};
void tokenizer_goto(const char *program);