ref: fff686c2f47cc41c09328e9f5bffe5b4a1037281
parent: 0b3f9e8300f084a030c21db509c1b31cfcc29ab5
author: Tevo <estevan.cps@gmail.com>
date: Fri Nov 20 18:29:10 EST 2020
Tiny fixes
--- a/cue.c
+++ b/cue.c
@@ -113,7 +113,7 @@
if(c->entries == nil)
c->entries = new;
else
- c->curentry->next = nil;
+ c->curentry->next = new;
c->curentry = new;
}
--- a/cue.l
+++ b/cue.l
@@ -47,5 +47,5 @@
[:\n] return *yytext;
"REM".*\n ;
-[ \t]+ ;
+[ \t\r]+ ;
%%
--- a/cue.y
+++ b/cue.y
@@ -3,13 +3,21 @@
#include <libc.h>
#include "cuefs.h"
+
+/*
+ * FIXME find a way to "fix" the grammar so that it
+ * doesn't do right-hand recursion (and overflow the
+ * stack) instead of just growing it and pretending
+ * it's not a problem
+ */
+#define YYMAXDEPTH 8192
%}
%union
{
- int i;
- char *str;
Timestamp time;
+ char *str;
+ int i;
}
%token <i> INTEGER
--- a/cuefs.h
+++ b/cuefs.h
@@ -45,10 +45,9 @@
typedef struct Entry
{
Timestamps;
- int index;
AFile *file;
+ int index;
char *title, *performer;
- Timestamp start;
struct Entry *next;
} Entry;
--- a/mkfile
+++ b/mkfile
@@ -6,6 +6,9 @@
YFILES=\
cue.y
+HDR=\
+ cuefs.h
+
OBJ=\
lex.yy.$O \
y.tab.$O \
@@ -14,9 +17,11 @@
cue.$O \
fs.$O
-%.$O: %.c
- $CC $CFLAGS $prereq
+CFLAGS=$CFLAGS
+%.$O: %.c $HDR
+ $CC $CFLAGS $stem.c
+
$O.out: $OBJ
$LD $prereq
@@ -23,7 +28,7 @@
lex.yy.c: $LFILES y.tab.h
$LEX -9 $LFILES
-y.tab.c y.tab.h: $YFILES
+y.tab.c y.tab.h: $YFILES mkfile
$YACC -d $YFILES
clean nuke:V: