From 97c98c7f8d33dd437bb2e0bb622f63c9c40c586a Mon Sep 17 00:00:00 2001 From: parking_turkeys Date: Wed, 2 Sep 2026 20:32:21 -0400 Subject: [PATCH] some work in tools.c idk --- render/.tools.c.swp | Bin 12288 -> 0 bytes render/tools.c | 50 +++++++++++++------------------------------- 2 files changed, 14 insertions(+), 36 deletions(-) delete mode 100644 render/.tools.c.swp diff --git a/render/.tools.c.swp b/render/.tools.c.swp deleted file mode 100644 index 0a9e2f968ba356cefb6040cf986d4a6f9fe6a9bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12288 zcmeI2O>Epm6vw9=N?f265UKb1$AbH-Dyf>g*k?XD7`# zi7s$Qq^1)EQ8=CnJ2Mj=x;!yO6b0$1a|eGtq!rK#+@k`S@M=ePv+=RIwXf1oPd&MC zkAbwCRzNGD70?Q31+)TM0j+>mKr3*+Dj?z=>>n)tA+Q8?6yTwMS^=$qRzNGD70?Q3 z1+)TM0j+>mKr5gX&t3fL}V$xg<8e;6CW|NrIR0DgI#v7fft!7d{R+MV*TKi&L+~DW6TA-AfCEm0m%tRTzya_AAn-hR0_*{O;4f(XC-?&> z-5-!z(%aAqXa%$aT7mmO0mDeR$dZr(Kjc%)@S-eqCmAcdPcO{PP2u%5j2Zrc1M;ET zhOwM*`=WgB_83mHFhQTw=FY`M^qi*|a&kN0qaoE#Gc!~lrc2V><({1dVp2uw30fGE zRrn%I(JU5Vv?39aT5)b-$W1J&2?v*~!JavzB*A^d-dP}|8q3oTuogi1_hk}afP!ciBy(s445cF=w zwrE$Wl2nFeU8HdWW3P8)e`>;R)DQhim86I3C$L39Aoxfb0x?(YAc&lyG%RAsTC0+U z;9G`J^U0NMB*2;?(}emK4Gd5&N`va;MzFG7m+Wv&wEeI}e(TsVW+>-eag-8VMVnJ> zCxX_Zj8<)Up`h|OeoEa@+Y>yY8D^X~Id_~!ytv$rGF?10aXyy}#a`qn6}Iplgu<3p z4(gU=!OApO+Yz%ITqVyB-KLaEI-{&gk2;bU8Dp|8 za|1v0kYAM`ETim=aOJP3yMp)8Rl8H^y5U7$x-I?ETBGQJg=yADWvLKS)zu@V$ysK| z!NQQHi%A+Zoi757$n#Pz&) zT+K2v4wgtV9NmSp=MXxgk+e!1U120RjfBIf#9j^5_T^aGL@jXj*(xj5$&#cg$C^?W z6kE98nsAjQRod{86>FN)$id>+dAS`l#$}@u1=$KmVaHj}Axq`(h1EFR)vw9LFqmIZGj0uO!`A|5p-O8O7Hf z9||b6Nmwof&Ia_9yH-b49aCx5GuJj&Wl2KnTZf>^>|dv`zzP5W diff --git a/render/tools.c b/render/tools.c index d0e0971..f9a0c01 100644 --- a/render/tools.c +++ b/render/tools.c @@ -3,7 +3,7 @@ static int call_wavtool (struct USTinfo *ust_settings, struct USTnote *note, char *oto); static int call_resampler(struct USTinfo *ust_settings, struct USTnote *note, char *oto); -static char *find_oto_line(char *oto_dir, char *lyric); +struct oto_line find_oto_line(char *oto_dir, char *lyric); static char curr_note_file[10]; // n0000.wav\0 static int notes_done = 0; @@ -37,11 +37,19 @@ int call_wavtool (struct USTinfo *s, struct USTnote *n) char *find_oto_line(char *oto_dir, char *lyric) { - static char line[1000]; //who has a longer oto line tbh - char check[64]; int c_i = 0; + char filename[256]; //reasonable length (in same folder usually) + char alias[256]; //bit much but who knows lol + struct oto_line line = { + filename, + alias, + 0, + 0, + 0, + 0, + 0 + }; + char part[64]; //wtf are you doing with a longer number tbh FILE *fp; - int check = 0; //the part you want to check is the part after = - int correct = 0; //if 0 && check > 1 dont add anything ig?? char *oto_path = malloc(snprintf(NULL, 0, "%s/oto.ini", oto_dir)); sprintf(oto_path, "%s/oto.ini", oto_dir); @@ -50,37 +58,7 @@ char *find_oto_line(char *oto_dir, char *lyric) char c; int i = 0; while ((c = getc(fp)) != EOF) { - line[i] = c; - switch (c) { - case '=': - check = 1; - c_i = 0; - break; - case ',': - if (check == 1) { - check[c_i] = '\0'; - if (same(check, lyric)) { - correct = 1; - }; - }; - check = 2; - break; - case '\n': - if (correct == 1) { - line[i] = '\0'; - goto found; - }; - i = 0; - check = 0; - break; - default: - if (check == 1) { - check[c_i] = c; - c_i++; - }; - break; - }; - i++; + }; return NULL; -- 2.47.3