From c0c1aca52592ee5f5ea21af9f4429e1285e709d5 Mon Sep 17 00:00:00 2001 From: Huck Boles Date: Sat, 22 Oct 2022 11:00:02 -0500 Subject: [PATCH] automatic backup --- ...@usr@include@bits@libc-header-start.h.blob | Bin 3215 -> 3205 bytes .../@usr@include@bits@time64.h.blob | Bin 2578 -> 2568 bytes .../@usr@include@bits@types.h.blob | Bin 9860 -> 9860 bytes .../@usr@include@bits@types@FILE.h.blob | Bin 2651 -> 2641 bytes .../@usr@include@bits@wordsize.h.blob | Bin 2630 -> 2620 bytes .../@usr@include@features-time64.h.blob | Bin 2447 -> 2437 bytes .../@usr@include@gnu@stubs-64.h.blob | Bin 2946 -> 2946 bytes .../@usr@include@gnu@stubs.h.blob | Bin 2426 -> 2426 bytes .../@usr@include@stdc-predef.h.blob | Bin 2908 -> 2898 bytes .../@usr@include@stdio.h.blob | Bin 37520 -> 37510 bytes .ccls-cache/@home@huck@.repos@odot/dialogue.c | 9 +++++++ .../@home@huck@.repos@odot/dialogue.c.blob | Bin 0 -> 2585 bytes .ccls-cache/@home@huck@.repos@odot/error.c | 2 -- .../@home@huck@.repos@odot/error.c.blob | Bin 2442 -> 0 bytes .../@home@huck@.repos@odot/file.c.blob | Bin 5452 -> 5452 bytes .ccls-cache/@home@huck@.repos@odot/func.c | 17 +++++++++++++ .../@home@huck@.repos@odot/func.c.blob | Bin 4078 -> 4772 bytes .../@home@huck@.repos@odot/input.c.blob | Bin 4273 -> 4266 bytes .../@home@huck@.repos@odot/main.c.blob | Bin 4162 -> 4162 bytes .ccls-cache/@home@huck@.repos@odot/odot.h | 3 ++- .../@home@huck@.repos@odot/odot.h.blob | Bin 3870 -> 3421 bytes .../@home@huck@.repos@odot/structure.c | 24 +++++++++--------- .../@home@huck@.repos@odot/structure.c.blob | Bin 4543 -> 4516 bytes dialogue.c | 9 +++++++ error.c | 2 -- func.c | 17 +++++++++++++ odot.h | 3 ++- structure.c | 24 +++++++++--------- 28 files changed, 80 insertions(+), 30 deletions(-) create mode 100644 .ccls-cache/@home@huck@.repos@odot/dialogue.c create mode 100644 .ccls-cache/@home@huck@.repos@odot/dialogue.c.blob delete mode 100644 .ccls-cache/@home@huck@.repos@odot/error.c delete mode 100644 .ccls-cache/@home@huck@.repos@odot/error.c.blob create mode 100644 dialogue.c delete mode 100644 error.c diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@libc-header-start.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@libc-header-start.h.blob index 8cab81649e95bbbe8d5ce394c3c6ad380d1fa171..9df32ba0f23cb110fc2b42e9049b2ad2bd018ec8 100644 GIT binary patch delta 34 ncmeB|Y?Yj#$efm$Gf`6sL~RTykfEdv*hL_tgqPszAy_Q delta 51 zcmZpb?3bLNC|q1pRGM5;T9m4n%)p$SlbDyzFfl=#117xD)0CCD$9LK0MphPf0LGsY AD*ylh diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time64.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time64.h.blob index 7d5ca101d5967f3bb034f0c8b18d3e148dbeb112..03bbdaa4431fc5e47c1a2e48e6342403c7e770b6 100644 GIT binary patch delta 34 ncmbOv(jhWIkvT0hXQHMOh}syOz{{rhS)Ew`zbgv6 delta 55 zcmeAWnItknQMkCIs5H5xv?x_CnSnVuCowObVPb+f2TXXQX96p8kMFX{jVuzIkFdJ1 F000wd69NDL diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types.h.blob index a54b7dd7ca8651e7dbbd8fdb89408c3a6e20496f..bb5f9fe493427b3885d3584bb9cc274c348c2ab0 100644 GIT binary patch delta 24 gcmZqiZSmc3iIsVW@`}lUEW(o?u&`}@$2v^`0D9I5ga7~l delta 24 gcmZqiZSmc3iIus>ciH4X7U9VcSlBkdW1Xe|0D5omvPWcsB6C`1&O}Wm5VbKlft7iO@`}lftdg70vzD^}0L=RfR{#J2 delta 55 zcmdlZa!h1`qHu9ZQE75XX;G?PG6QpRPGVj{rhSvRu+080V~4gdfE diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs.h.blob index 673cd05f31d934bad4ab640a17c1622c9d828cba..2b84f8b73cbc50770c60e4860c8e8f085ee3856f 100644 GIT binary patch delta 20 ccmew*^h;>NW>)4M$}1)_vPy0~&$^l!09;}R?f?J) delta 20 ccmew*^h;>NW>)4N-(`~-StU20XI;$<09*_Q>Hq)$ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdc-predef.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdc-predef.h.blob index dc3462191e7ce4c36d29c752a5e60dbc3446d263..ec725debd6f0b76f6da0e9b960661e4f4f5756d9 100644 GIT binary patch delta 34 ocmca3c1di4B6C`1&O}Wm5VbKlft7iO@`}lftdg70v-YwA0Mk?po&W#< delta 55 zcmca4c1LW2qHu9ZQE75XX;G?PG6QpRPGVj-;MU^2-G?jEE6cVM- zsAQOng`radMug*L@gIS3E##6l3s^Eqi57D6Jc15hAfqH=4dJGwi0I9VPAhQn=;PPZ z-pPz6I zEvaim;B1Ec{-7s^)5p`JOU>JXV7YKSzn?ApqE{P*NJ;0ZK2?(95~>PIT0-BKc*$FC za_!_859@c=EkSbjwlV@M%YsU1_fm$pveWb3+${1Z%m;Yb{Y#aUK+a!8!C81Icis#go1?=7%s`sf!h^qeEC&{$Rk(L$Rz~{O zwq=0k8Z$lTIAzPmSuM22*l4CVLB>9ngL2oJ3CrE~mB5u<@>VI=E=bJX?GcCHE?sRj z{Tz=9$TldGyu#Rgi0yo0kPKp0F1}uEFb4L^DGB@IRG~H z+q>UCpS`^I0qke?GssTdYxmI!xq9p1CQknra?k!MpX3MU`Hd{Ul^>j(@7r%iw?~ux F>>oM|+h+g( literal 0 HcmV?d00001 diff --git a/.ccls-cache/@home@huck@.repos@odot/error.c b/.ccls-cache/@home@huck@.repos@odot/error.c deleted file mode 100644 index 73d6a23..0000000 --- a/.ccls-cache/@home@huck@.repos@odot/error.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "odot.h" - diff --git a/.ccls-cache/@home@huck@.repos@odot/error.c.blob b/.ccls-cache/@home@huck@.repos@odot/error.c.blob deleted file mode 100644 index 09b9088b3aa0a5703541b2c48dbf058cda5778c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2442 zcmai0L9Wv<5Dnr690TDRr0VYwE0B;_uwZXF&b0BbV@LLwQdXSiuUT?}e+Mq}h3%xD zM75ntUCs2(n>TO9ece30`u6bHyl7}|2B5tcC%UsR8b?iMkb$Z& zN$Ml%qy>S-UfvgQn-A1GOQjadcR&SRM%eYu)0_KWkE=*4(a{)nl(C_8$PpN3QxCw= zTX5N6!Z|3zQ4?W?!RT@t$^o4GSs~P35ZsxM6^uk#C?ie9yl&awk0jMoUZoD8~?Tx)Q(W~Hf zr?u(b#Zl40p{7%Bfp^69+(Ji^F6EYIZuT7QSWa838<(Iu`_P#neP98WguS%+tz2k+ zom)Wu&eaBwuz$7o=Zg@hQ=83*NvG5q;a2n;RcZ7^4N#eQ-i&Wm-lmhsS5;~b2t$s! z$pQHb9M5n}`SbN*ZIY$1^5_5yv|~prKG&nW0AS43Afg`~sBqHDK=Hm9reuC8ueX^* zHh239%to2%glB&rS#B)C~$Pqeh9BEaOxvLd9pz z=j|SJ6=V!cJ~`#)f#fQ_9%cA>=?0JRqnwqoZPq5$muhOq*sl0^CX-}Y9JQwoed|cg r9m{pj!h`~0-Lj$Q3fbuYW!MPQn+v}ZY9c_AO|MABe^>KvH{tUSo#nam diff --git a/.ccls-cache/@home@huck@.repos@odot/file.c.blob b/.ccls-cache/@home@huck@.repos@odot/file.c.blob index 9afed16e2dcde405ef4d9a519e0be47e375b3c8d..5ce3b003db84050a257ec877717128e127aba895 100644 GIT binary patch delta 20 ccmX@3bw+E$N>=6_$}1)}vPf(`!rH+P09)k<6aWAK delta 20 ccmX@3bw+E$N>*l}(q)qyStK?eVeQ}t09TI(z5oCK diff --git a/.ccls-cache/@home@huck@.repos@odot/func.c b/.ccls-cache/@home@huck@.repos@odot/func.c index 7eed44c..e88fb54 100644 --- a/.ccls-cache/@home@huck@.repos@odot/func.c +++ b/.ccls-cache/@home@huck@.repos@odot/func.c @@ -33,3 +33,20 @@ int geturgency(int n){ } +char *gettime(void){ + char *c = malloc(64*sizeof(char)); + time_t t = time(NULL); + if (t == ((t) - 1)){ + error('t'); + } + + c = ctime(&t); + + if (c == NULL){ + error('t'); + } + + return c; + + +} diff --git a/.ccls-cache/@home@huck@.repos@odot/func.c.blob b/.ccls-cache/@home@huck@.repos@odot/func.c.blob index db3956c63c493bbb818cf52a3650736e1cd10a62..1e4696f2b7d83d29ae6baf6e2af8e1f9e09e0991 100644 GIT binary patch delta 782 zcmaDSzeJTwi{alg)fLAW7#Sueh;LNvU}fH+ykc@Ai^S$5tOuFvdH)x+yuH2PZEAgL zMM-K=o}5Z(eBuYF z8=y9V-GE`cj0^{|?W%IBYGB*H7K)v_p7ZP@!~^N6C1CBE3_Lu1jLJO9QcR4>48}}A ztxW$79XdkaT#*0pzqJ0{gTzLzPp8;bWK=Z%Gp<|C5&QT=4KvU{3;~cu|6vXVslX5b z`3oKhAQhmHfrl?h0O(^>6>L0=AkS=W<4j=UVPchG)c~qu1lm3M759mH*8hnYq8=yQ zcybNmV`TDw*|SJ_2>~7FlFEYAl+-i@Nb~?B3KC)rN=o490qTL9@&{x9qbi502n*wO zWW&JX|4X5P!LSV?H+dJ2dw?KZ7#b5L419b{Ft&m%*g6frP#+&nklA9Y5=E@hEb52(}Od>fl*aM Q)xd#KM@mO&@+AHk0E@iptN;K2 delta 79 zcmV-V0I>h0CGH;zDggd)b*9Du0RWL;7qKCT1p^XwrjvmL7_-C$!2X delta 53 zcmZ3bxKVM#BUYw>Ws?nAq&EL!{mdzwT2Yc(l&6rHSE5i_l%ATGT*)9N#>c?Gu#K02 JaWcEWVgMAN5k~+3 diff --git a/.ccls-cache/@home@huck@.repos@odot/main.c.blob b/.ccls-cache/@home@huck@.repos@odot/main.c.blob index 95e5e2f72bcae8d90a26d6cd3d9907ec21d6d685..9ab12dad3e25b78aa864be61084cb7e7b0516721 100644 GIT binary patch delta 20 ccmX@4a7bapN>=6_$}1)}vPf(`!dk}#09fb;-2eap delta 20 ccmX@4a7bapN>=7w1Cl_oc^uugu% zq%gUZNfj)v$HG2Yl35w87@qu}OpZ!E6eXXR_r_R%bs6<_mL3PyWEJ z3|3>wp**>sLt%0Zke<)+2`qn;bLM0LF3!obxa23-aEU_P!4*DPhTD(h^J8PLA7U;a zCO_lW;&`EQ_=3d#%&N)7JgOW^-?9Hvzp-!8WH%mFYh7le*D_u=PnYFqrYNKq73CLc zBxfWRX)-c#0cW;=GEd9 p5h)QF2=5M`69A!UoxK16 delta 801 zcma)(U1-x#6vuBqn&zXE)+BDMUF|wMwytUCaCP8=pkts+oW7_a)Hcc5%$SU}sTD;9 z88}2)JP0B>st=;D7atUcvVqD(`y}`Qf(&1TfgiXh5!p;T!GZ|hhs!9 z4zf|SvfjGAfG}hqX^xnRS&ZipDeGw?i=?ud8B^t=R#GLor$@@EX+_P~Kxz%Nhhsa3 z5>_Ff&MG$Y{kvjgd`bRLeT1l@$#w z*eCWU|EqD_N-657W~hbVt$<;?{W)w`+ky=NbxWbBq|%uN@HA}4C0N2DpyLrZi-qk< z6I8JvoWUp%@J_geg~7%TH#a27PKvH&>eqyCZa=gWZE%IyD=oq^x(n7Z2iZSipfY=hc3%$PEbi-iQ8G0pq-bf~ z%vx%foJ;3pq1qmbb|aScqWbb6g!x!sD~9=yFNx6V(~;7|%%$ab@R5zv`ZPH<^ZNWC zJYu5sWOedEz@C2#C)rMV;>}#{+~Zd_z|ThLDYcvXuvonSUziBJbSQX#k3T;JciDcr zbbRo7F4mHT0C$ZLkqEQg03&)tFOJo!A6%3XXki162}l6R)6Vc7UcfOP@o>QNkl|bT Kz*^;R+VKnTz5etd+|* z?f<{RGxwi8@|inXkweu&&oKTI{5;ZD3{cK zm_?J{bEV1Ll&x-Sn)F*_CHk;!2^>QYKgGiE5WXgd6_x7zZ3?q&&t|HhwX z)YDVM3MNnI(XOw%BYS9t;~6$&{nfP$e0&^0r?T>~iZL;=GH`?Z&iY@|MTq^#ibg?( z|F_icM*p9-{!GLFo8R9|GZN_g^_PM1Kd-oF-p!z|3DQP5W0&=FLl%xs5Tb2AOMzAPF)>V=U4h>K|@+t6XFfsCR@M$2lsR$Yf zz#jcu`qEE%_t)yqvF5_0I|9^ A6aWAK delta 851 zcmZ3YykD6^i{an3s%6I*Cg*WVPW0y4sN2TMEL6H|G9#kgN z#6bAeB-zZe{LB=Eg3^+_{E}3S;*z4$QdJh%Stc( zG2!li(H~kbZu`9u{r}14gWtUmS^p+C@n{P_YP+QS{fzDcB>j^Q@JL3)Y7}rdHv2g+ z{BK|Ud&4=wlno94qf{ThcT)Vm;x7Z^|L#e3wLd+ky!h+D_}@fxS+VFVmioU9j11z8 z3=GV0EB?bm6X9q>-X#ez!{H{vjf0!@ALecbez;yFH!76m761c@je&ttRY6saiBXk9 zRqa2_Gm}mEw3J}s1r1XM9v)ygGOC!VSo~#TVN}slv6$S*XU72xmdV}%T9fzlIT^y7 zjBHyT&@PZ}Nh3)UkZwsSNfU%^%LG&eU||DF6X39q<~I_61rl7)M$k|I7FuvYJ^|Co zor2Pwa4%23$*(E^3nRF)x%?)=u&6_F+vK|f;v8^~{}C{dfJGR@;~>XaS%IA-$#10i dx!_$xu=?DKkfaGAnWW^T^c)yvQ)EjV7y*+UN`?Rc diff --git a/dialogue.c b/dialogue.c new file mode 100644 index 0000000..9e186ad --- /dev/null +++ b/dialogue.c @@ -0,0 +1,9 @@ +#include "odot.h" + +void error(char type){ + switch (type) { + case 'f': + case 't': + case '' + } +} diff --git a/error.c b/error.c deleted file mode 100644 index 73d6a23..0000000 --- a/error.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "odot.h" - diff --git a/func.c b/func.c index 7eed44c..e88fb54 100644 --- a/func.c +++ b/func.c @@ -33,3 +33,20 @@ int geturgency(int n){ } +char *gettime(void){ + char *c = malloc(64*sizeof(char)); + time_t t = time(NULL); + if (t == ((t) - 1)){ + error('t'); + } + + c = ctime(&t); + + if (c == NULL){ + error('t'); + } + + return c; + + +} diff --git a/odot.h b/odot.h index 8dd58e8..d617324 100644 --- a/odot.h +++ b/odot.h @@ -15,7 +15,8 @@ void rem(void); void show(void); int listcheck(void); int geturgency(int); -void dialogue(char, char *); + +void error(char); char *note, *o; int urgency; diff --git a/structure.c b/structure.c index 2e76b77..5071761 100644 --- a/structure.c +++ b/structure.c @@ -3,19 +3,19 @@ extern int urgency; extern FILE *fp; -struct note { +struct task { int length; - char *note; + char *task; int date; int due; int urgency; }; -struct note makenote(int n, char **arg){ - struct note temp; +struct task maketask(int n, char **arg){ + struct task temp; - temp.note = getnote(n,arg); - temp.length = strlen(temp.note); + temp.task = getnote(n,arg); + temp.length = strlen(temp.task); temp.date = 0; temp.due = 0; temp.urgency = urgency; @@ -23,21 +23,21 @@ struct note makenote(int n, char **arg){ return temp; } -void putnote(struct note n){ +void puttask(struct task n){ fp = fopen(TODOLIST, "w"); if (fp == NULL){ - printf("ERROR: COULD NOT OPEN FILE %s\n", TODOLIST); + error('f'); } - fprintf(fp, "%i\t%s\t%i\t%i\t%i\n",n.length,n.note,n.date,n.due,n.urgency); + fprintf(fp, "%i\t%s\t%i\t%i\t%i\n",n.length,n.task,n.date,n.due,n.urgency); } -struct note findnote(char *c){ - struct note tmp; +struct task gettask(char *c){ + struct task tmp; - sscanf(c,"%i\t%s\t%i\t%i\t%i\n",&tmp.length,tmp.note,&tmp.date,&tmp.due,&tmp.urgency); + sscanf(c,"%i\t%s\t%i\t%i\t%i\n",&tmp.length,tmp.task,&tmp.date,&tmp.due,&tmp.urgency); return tmp; } -- 2.45.2