From: Huck Boles Date: Wed, 16 Nov 2022 06:00:08 +0000 (-0600) Subject: Wed Nov 16 12:00:08 AM CST 2022 automatic backup X-Git-Url: https://git.huck.website/?a=commitdiff_plain;h=a2ae00b8925b9ab12090ee78c97010ed2c889857;p=odot.git Wed Nov 16 12:00:08 AM CST 2022 automatic backup --- diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@alloca.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@alloca.h.blob index cdd7246..1def0ca 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@alloca.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@alloca.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@atomic_wide_counter.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@atomic_wide_counter.h.blob index c5182e2..ace0daf 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@atomic_wide_counter.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@atomic_wide_counter.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@byteswap.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@byteswap.h.blob index 0fd40ab..c26ab6d 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@byteswap.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@byteswap.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endian.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endian.h.blob index 86c20b1..43b3422 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endian.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endian.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endianness.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endianness.h.blob index 22d90e1..c78f2d9 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endianness.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@endianness.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn-common.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn-common.h.blob index cd467e7..77f1cf8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn-common.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn-common.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn.h.blob index c251ccd..514dc75 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@floatn.h.blob differ 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 b31f8cc..c07a751 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@libc-header-start.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@libc-header-start.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@long-double.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@long-double.h.blob index e0febfa..af73510 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@long-double.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@long-double.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes-arch.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes-arch.h.blob index f2697e1..5bcf91e 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes-arch.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes-arch.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes.h.blob index 6bd04ef..2a8cef8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@pthreadtypes.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@select.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@select.h.blob index ff08d56..8dc32db 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@select.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@select.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdint-intn.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdint-intn.h.blob index 51ab57b..0e6e59d 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdint-intn.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdint-intn.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdio_lim.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdio_lim.h.blob index c27d24b..bbfabde 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdio_lim.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdio_lim.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdlib-float.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdlib-float.h.blob index 11b7544..cf0a36a 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdlib-float.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@stdlib-float.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_mutex.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_mutex.h.blob index 339a19b..cf04c35 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_mutex.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_mutex.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_rwlock.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_rwlock.h.blob index e7467aa..9aec1a8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_rwlock.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@struct_rwlock.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@thread-shared-types.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@thread-shared-types.h.blob index d16ea11..2276a3b 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@thread-shared-types.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@thread-shared-types.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time.h.blob index 2ddde6d..c173744 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time.h.blob differ 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 4bb5a3a..50b0ed0 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time64.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@time64.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@timesize.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@timesize.h.blob index e49fc27..8ade908 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@timesize.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@timesize.h.blob differ 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 89b8001..2a97e0c 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@FILE.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@FILE.h.blob index ebaf7cf..5a3bb1c 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@FILE.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@FILE.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__FILE.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__FILE.h.blob index 1cac517..be64c04 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__FILE.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__FILE.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos64_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos64_t.h.blob index dd989fd..482f059 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos64_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos64_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos_t.h.blob index 5e5869e..563cba8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__fpos_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__locale_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__locale_t.h.blob index 31a4379..fcab531 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__locale_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__locale_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__mbstate_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__mbstate_t.h.blob index e3cfe5b..65988fe 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__mbstate_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__mbstate_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__sigset_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__sigset_t.h.blob index 4efe155..d4abd4a 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__sigset_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@__sigset_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clock_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clock_t.h.blob index fb33c85..28a3751 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clock_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clock_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clockid_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clockid_t.h.blob index 66dea25..6fb9529 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clockid_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@clockid_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@locale_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@locale_t.h.blob index 965dd0c..ce5c182 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@locale_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@locale_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@sigset_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@sigset_t.h.blob index 613e34b..14f9b4f 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@sigset_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@sigset_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_FILE.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_FILE.h.blob index a03baf0..be80bf8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_FILE.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_FILE.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_itimerspec.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_itimerspec.h.blob index 5475e8f..1c8657c 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_itimerspec.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_itimerspec.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timespec.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timespec.h.blob index 72af6e8..eb03376 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timespec.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timespec.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timeval.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timeval.h.blob index 1627676..de5ad2b 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timeval.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_timeval.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_tm.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_tm.h.blob index 45efc3a..38ec2d1 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_tm.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@struct_tm.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@time_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@time_t.h.blob index 8330a3a..4efdcf0 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@time_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@time_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@timer_t.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@timer_t.h.blob index dce1c54..15f8199 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@timer_t.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@types@timer_t.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@typesizes.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@typesizes.h.blob index 17aa1e8..84ac1fc 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@typesizes.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@typesizes.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@uintn-identity.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@uintn-identity.h.blob index 4863bc8..54b2159 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@uintn-identity.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@uintn-identity.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitflags.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitflags.h.blob index 4f7a3b7..9f14f3a 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitflags.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitflags.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitstatus.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitstatus.h.blob index 299f299..5bd4035 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitstatus.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@waitstatus.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@wordsize.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@wordsize.h.blob index fa68527..bcbe4f3 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@wordsize.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@bits@wordsize.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@ctype.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@ctype.h.blob index a1b995c..91092a7 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@ctype.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@ctype.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@endian.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@endian.h.blob index 5221da1..8da2d98 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@endian.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@endian.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features-time64.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features-time64.h.blob index 2666fdd..a2c8cf8 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features-time64.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features-time64.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features.h.blob index bfbae8f..c2942a4 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@features.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs-64.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs-64.h.blob index 620f210..c733566 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs-64.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs-64.h.blob differ 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 f1eef9b..4d6b49e 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@gnu@stubs.h.blob differ 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 305f4ab..b299ad6 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdc-predef.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdc-predef.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdio.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdio.h.blob index a1526a4..d8ef87d 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdio.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdio.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdlib.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdlib.h.blob index 6fd2401..aac09a2 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdlib.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@stdlib.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@string.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@string.h.blob index 134b728..7a24568 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@string.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@string.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@strings.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@strings.h.blob index 4079113..6186c27 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@strings.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@strings.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@cdefs.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@cdefs.h.blob index 7ff0535..7787875 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@cdefs.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@cdefs.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@select.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@select.h.blob index 31ab7cd..6a58d20 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@select.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@select.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@types.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@types.h.blob index 765017f..1419156 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@types.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@sys@types.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@time.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@time.h.blob index 76de664..ac19188 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@include@time.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@include@time.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stdarg.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stdarg.h.blob index def4394..8f02329 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stdarg.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stdarg.h.blob differ diff --git a/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stddef.h.blob b/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stddef.h.blob index bc9faee..0d5f410 100644 Binary files a/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stddef.h.blob and b/.ccls-cache/@@home@huck@.repos@odot/@usr@lib@clang@14.0.6@include@stddef.h.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/dialogue.c b/.ccls-cache/@home@huck@.repos@odot/dialogue.c index bf125b9..7e7fdc6 100644 --- a/.ccls-cache/@home@huck@.repos@odot/dialogue.c +++ b/.ccls-cache/@home@huck@.repos@odot/dialogue.c @@ -1,23 +1,3 @@ #include "odot.h" -void error(int err){ - switch (err) { - case '1': - fprintf(stderr,"ERROR: COULD NOT ACCESS FILE: %s\n", TODOLIST); - case '2': - fprintf(stderr,"ERROR: COULD NOT GET CURRENT TIME\n"); - case '3': - fprintf(stderr,"ERROR: ARGUMENT OUT OF RANGE\n"); - } - exit(err); -} - -void dialogue(char *m1, char *m2, int c){ - printf("\033[1;3%im%s\033[0m: %s\n", c, m1, m2); - return; -} - -void formattask(struct task t){ - printf("* %s\t%s\t%i", t.task, t.group, t.date); -} diff --git a/.ccls-cache/@home@huck@.repos@odot/dialogue.c.blob b/.ccls-cache/@home@huck@.repos@odot/dialogue.c.blob index 7dffb28..81e389a 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/dialogue.c.blob and b/.ccls-cache/@home@huck@.repos@odot/dialogue.c.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/file.c b/.ccls-cache/@home@huck@.repos@odot/file.c index 0d9dc1f..2d5b277 100644 --- a/.ccls-cache/@home@huck@.repos@odot/file.c +++ b/.ccls-cache/@home@huck@.repos@odot/file.c @@ -1,67 +1,93 @@ #include "odot.h" - -extern FILE *fp; - -enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; - void add(struct task t, FILE *fp){ + printf("\nalloc\n"); char *c = malloc(strlen(t.task)*sizeof(char)); - FILE *fc = fopen("/tmp/odot", "w"); + printf("\nfopen\n"); + FILE *buf = fopen("odot.tmp", "w"); int i = 0; + printf("\nloopstart\n"); + int j = 0; while (fgets(c,strlen(t.task),fp) != NULL){ + printf("\n%i-nloop\n", j++); switch (listcheck(t,fp)){ case 3: dialogue("Already on todo list", t.task, CYAN); - break; + printf("Remove from list?"); + if (check() == 0){ + break; + } else { + puttask(gettask(fp), buf); + break; + } case 1: dialogue("Already on list in a different group", gettask(fp).group, YELLOW); - /* confirm(); */ + if (check() == 0){ + puttask(t,buf); + i++; + } + puttask(gettask(fp), buf); break; default: + /* first time t.task is lexigraphically greater than a previous task */ if (i == 0 && strcmp(c,t.task) > 0){ - puttask(t,fc); + puttask(t,buf); ++i; } + puttask(gettask(fp), buf); + break; } - puttask(gettask(fp), fc); } free(c); fclose(fp); - fclose(fc); - remove(TODOLIST); - rename("/tmp/odot", TODOLIST); + fclose(buf); + remove("/home/huck/.local/state/odot/todo"); + rename("odot.tmp", "/home/huck/.local/state/odot/todo"); return; } -void rem(FILE *fp){ +void rem(struct task t, FILE *fp){ char *s = malloc(MAXLINE * sizeof(char)); - FILE *fc = fopen("/tmp/odot", "w"); + FILE *buf = fopen("odot.tmp", "w"); + int i = 0; while (fgets(s, MAXLINE, fp) != NULL){ s[strlen(s) - 1] = 0; - if (strcmp(note, s) != 0){ - fputs(strcat(s,"\n"),fc); + if (strcmp(t.task, s) != 0){ + fputs(strcat(s,"\n"),buf); + } else { + i++; } } fclose(fp); - fclose(fc); + fclose(buf); + + remove ("/home/huck/.local/state/odot/todo"); + rename("odot.tmp", "/home/huck/.local/state/odot/todo"); - remove (TODOLIST); - rename("/tmp/odot", TODOLIST); + if (i == 0){ + dialogue("Task not found", t.task, YELLOW); + printf("Add to list?"); + if(check() == 0){ + add(t,fp); + } + } free(s); } -void show(FILE *fp){ +void show(char *group, FILE *fp){ char *c = malloc(sizeof(char)); - while (fgets(c, 1, fp) != NULL ) - formattask(gettask(fp)); + while (fgets(c, 1, fp) != NULL ){ + if (strcmp(group, "all") == 0 || strcmp(gettask(fp).group, group) == 0){ + formattask(gettask(fp)); + } + } free(c); } diff --git a/.ccls-cache/@home@huck@.repos@odot/file.c.blob b/.ccls-cache/@home@huck@.repos@odot/file.c.blob index e7c1ccb..6379548 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/file.c.blob and b/.ccls-cache/@home@huck@.repos@odot/file.c.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/func.c b/.ccls-cache/@home@huck@.repos@odot/func.c index 1991b9e..73d6a23 100644 --- a/.ccls-cache/@home@huck@.repos@odot/func.c +++ b/.ccls-cache/@home@huck@.repos@odot/func.c @@ -1,32 +1,2 @@ #include "odot.h" -enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; - - /* Returns: - 0 - Nothing matches - 1 - Task matches - 2 - Group matches - 3 - Both match - */ -int listcheck(struct task t, FILE *fp){ - int i; - i += (strcmp(t.task,gettask(fp).task) == 0) ? 1 : 0; - i += (strcmp(t.group,gettask(fp).group) == 0) ? 2 : 0; - return i; -} - - -char *gettime(void){ - return NULL; -} - -int linecount(FILE *fp){ - int i = 0; - char c; - while ((c = fgetc(fp)) != EOF){ - if (c == '\n') - i++; - } - fseek(fp,0,SEEK_SET); - return i; -} diff --git a/.ccls-cache/@home@huck@.repos@odot/func.c.blob b/.ccls-cache/@home@huck@.repos@odot/func.c.blob index 4100071..806d62e 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/func.c.blob and b/.ccls-cache/@home@huck@.repos@odot/func.c.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/input.c b/.ccls-cache/@home@huck@.repos@odot/input.c index 0cc316a..0cb2c50 100644 --- a/.ccls-cache/@home@huck@.repos@odot/input.c +++ b/.ccls-cache/@home@huck@.repos@odot/input.c @@ -1,17 +1,27 @@ #include "odot.h" -extern char *note, *group; -extern int urgency; - -char *getnote(int n, char *arg[]){ +struct task getnote(int n, char *arg[], char *group){ char *s = malloc(MAXLINE * sizeof(char)); + struct task tmp; + + if (n == 1) + printf("\nreturn from note\n"); + return tmp; + -/* adds word to note if it doesn't start with - */ - while(--n > 0 && (*++arg)[0] != '-'){ + while(n-- > 0){ + printf("\n%i-nloop\n",n); + if (*arg[0] != '-'){ strcat(s, *arg); strcat(s, (n > 1) ? " " : ""); + } else if (strcmp(*arg,"-g") == 0){ + strcpy(group, *arg); + } } - return s; + strcpy(tmp.task, s); + strcpy(tmp.group, group); + free(s); + return tmp; } /* uses a 3 bit number to represent options @@ -20,23 +30,23 @@ char *getnote(int n, char *arg[]){ 4 - remove from list */ short getopt(int n, char *arg[]){ - char *c; short options; - + + printf("\nreturn1\n"); /* show list if no arguments given */ if (n == 1) return 1; + printf("\ncheckopt\n"); while (--n > 0 && (*++arg)[0] == '-'){ /* if theres a d delete, otherwise add */ - options += strchr(*arg, 'd') ? 4 : 2; options += strchr(*arg, 's') ? 1 : 0; - /* if theres a g then add the next argument as a group */ - if (strchr(*arg,'g') != NULL){ - strcpy(group,*++arg); - } + options += strchr(*arg, 'n') ? 2 : 0; + options += strchr(*arg, 'd') ? 4 : 0; } - + printf("%i", options); + if ((options - 5) > 0) + error(2); return options; } diff --git a/.ccls-cache/@home@huck@.repos@odot/input.c.blob b/.ccls-cache/@home@huck@.repos@odot/input.c.blob index 3ae02cf..19f6e3c 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/input.c.blob and b/.ccls-cache/@home@huck@.repos@odot/input.c.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/main.c b/.ccls-cache/@home@huck@.repos@odot/main.c index a1134e2..9b86cd1 100644 --- a/.ccls-cache/@home@huck@.repos@odot/main.c +++ b/.ccls-cache/@home@huck@.repos@odot/main.c @@ -1,10 +1,84 @@ #include "odot.h" -extern char *note, *o; -extern int urgency; - int main(int argc, char *argv[]){ + printf("\nstart\n"); + struct task note; + short opt; + FILE *fp; + char *group = malloc(MAXLINE*sizeof(char)); + + printf("\nfopen\n"); + fp = fopen("/home/huck/.local/state/odot/todo", "w+"); + if (!fp){ + error(1); + } + + printf("\ngetopt\n"); + opt = getopt(argc, argv); + + printf("\ngetnote\n"); + note = getnote(argc, argv, group); + + if (opt >= 4){ + printf("\nrem\n"); + rem(note, fp); + } else { + printf("\nadd\n"); + add(note, fp); + } + if (opt % 2 != 0){ + printf("\nshow\n"); + show(group, fp); + } + + free(group); + fclose(fp); return 0; } +void error(int err){ + switch (err) { + case 1: + fprintf(stderr,"ERROR: COULD NOT ACCESS FILE: %s\n", "/home/huck/.local/state/odot/todo"); + break; + case 2: + fprintf(stderr,"ERROR: CANT ADD AND REMOVE SAME TASK\n"); + break; + } + exit(err); +} + +void dialogue(char *m1, char *m2, int c){ + printf("\033[1;3%im%s\033[0m: %s\n", c, m1, m2); + return; +} + +void formattask(struct task t){ + printf("* %s\t%s\t%i", t.task, t.group, t.date); +} + + /* Returns: + 0 - Nothing matches + 1 - Task matches + 2 - Group matches + 3 - Both match + */ +int listcheck(struct task t, FILE *fp){ + int i; + i += (strcmp(t.task,gettask(fp).task) == 0) ? 1 : 0; + i += (strcmp(t.group,gettask(fp).group) == 0) ? 2 : 0; + return i; +} + +char *gettime(void){ + return NULL; +} + +/* returns 0 for yes and 1 for no */ +int check(void){ + printf("Continue? [y/n] (y):"); + if (((char) getchar()) == 'n') + return 1; + return 0; +} diff --git a/.ccls-cache/@home@huck@.repos@odot/main.c.blob b/.ccls-cache/@home@huck@.repos@odot/main.c.blob index eaa9588..e10b157 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/main.c.blob and b/.ccls-cache/@home@huck@.repos@odot/main.c.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/odot.h b/.ccls-cache/@home@huck@.repos@odot/odot.h index b881802..78c3548 100644 --- a/.ccls-cache/@home@huck@.repos@odot/odot.h +++ b/.ccls-cache/@home@huck@.repos@odot/odot.h @@ -3,10 +3,10 @@ #include #include #include +#define TODOLIST "/home/huck/.local/state/odot/todo" #define MAXLINE 1000 #define TIME "%H:%M %m-%d-%y" -#define TODOLIST "/home/huck/.local/state/odot/todo" struct task { char *task; @@ -14,12 +14,12 @@ struct task { char *group; }; -char *getnote(int, char *[]); +struct task getnote(int, char *[], char *); short getopt(int, char *[]); void add(struct task, FILE *); -void rem(FILE *); -void show(FILE *); +void rem(struct task, FILE *); +void show(char *group, FILE *); int listcheck(struct task, FILE *); int geturgency(int); @@ -28,13 +28,10 @@ char *gettime(void); void dialogue(char *, char *, int); void formattask(struct task t); void error(int); - -int linecount(FILE *); +int check(void); struct task maketask(char *, char *); void puttask(struct task n, FILE*); struct task gettask(FILE *); -char *note, *o; -FILE *fp; - +enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; diff --git a/.ccls-cache/@home@huck@.repos@odot/odot.h.blob b/.ccls-cache/@home@huck@.repos@odot/odot.h.blob index 54cbfa5..ee68686 100644 Binary files a/.ccls-cache/@home@huck@.repos@odot/odot.h.blob and b/.ccls-cache/@home@huck@.repos@odot/odot.h.blob differ diff --git a/.ccls-cache/@home@huck@.repos@odot/test.c b/.ccls-cache/@home@huck@.repos@odot/test.c new file mode 100644 index 0000000..f1e123c --- /dev/null +++ b/.ccls-cache/@home@huck@.repos@odot/test.c @@ -0,0 +1,9 @@ +#include + +int main(int argc, char *argv[]){ + FILE *fp = fopen("/home/huck/.local/state/odot/todo", "w+"); + + fclose(fp); + return 0; +} + diff --git a/.ccls-cache/@home@huck@.repos@odot/test.c.blob b/.ccls-cache/@home@huck@.repos@odot/test.c.blob new file mode 100644 index 0000000..a89433e Binary files /dev/null and b/.ccls-cache/@home@huck@.repos@odot/test.c.blob differ diff --git a/Makefile b/Makefile index 722a5a5..6ced421 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,14 @@ SHELL = /bin/zsh -PROG = todo +PROG = odot PREFIX ?= /usr/local/bin -TODOLIST = $(HOME)/.local/share/odot/todo +ODOT = /home/huck/.local/share/odot +TODOLIST = $(ODOT)/todo -install : main.c input.c file.c dialogue.c func.c +install : main.c input.c file.c + [[ ! -d $(TODOLIST) ]] && mkdir -p $(ODOT) gcc *.c -o '$(PREFIX)/$(PROG)' - [[ ! -d $(TODOLIST) ]] && mkdir -p $(TODOLIST) -header : todo.h +header : odot.h gcc *.h clean : diff --git a/dialogue.c b/dialogue.c index bf125b9..7e7fdc6 100644 --- a/dialogue.c +++ b/dialogue.c @@ -1,23 +1,3 @@ #include "odot.h" -void error(int err){ - switch (err) { - case '1': - fprintf(stderr,"ERROR: COULD NOT ACCESS FILE: %s\n", TODOLIST); - case '2': - fprintf(stderr,"ERROR: COULD NOT GET CURRENT TIME\n"); - case '3': - fprintf(stderr,"ERROR: ARGUMENT OUT OF RANGE\n"); - } - exit(err); -} - -void dialogue(char *m1, char *m2, int c){ - printf("\033[1;3%im%s\033[0m: %s\n", c, m1, m2); - return; -} - -void formattask(struct task t){ - printf("* %s\t%s\t%i", t.task, t.group, t.date); -} diff --git a/file.c b/file.c index 0d9dc1f..2d5b277 100644 --- a/file.c +++ b/file.c @@ -1,67 +1,93 @@ #include "odot.h" - -extern FILE *fp; - -enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; - void add(struct task t, FILE *fp){ + printf("\nalloc\n"); char *c = malloc(strlen(t.task)*sizeof(char)); - FILE *fc = fopen("/tmp/odot", "w"); + printf("\nfopen\n"); + FILE *buf = fopen("odot.tmp", "w"); int i = 0; + printf("\nloopstart\n"); + int j = 0; while (fgets(c,strlen(t.task),fp) != NULL){ + printf("\n%i-nloop\n", j++); switch (listcheck(t,fp)){ case 3: dialogue("Already on todo list", t.task, CYAN); - break; + printf("Remove from list?"); + if (check() == 0){ + break; + } else { + puttask(gettask(fp), buf); + break; + } case 1: dialogue("Already on list in a different group", gettask(fp).group, YELLOW); - /* confirm(); */ + if (check() == 0){ + puttask(t,buf); + i++; + } + puttask(gettask(fp), buf); break; default: + /* first time t.task is lexigraphically greater than a previous task */ if (i == 0 && strcmp(c,t.task) > 0){ - puttask(t,fc); + puttask(t,buf); ++i; } + puttask(gettask(fp), buf); + break; } - puttask(gettask(fp), fc); } free(c); fclose(fp); - fclose(fc); - remove(TODOLIST); - rename("/tmp/odot", TODOLIST); + fclose(buf); + remove("/home/huck/.local/state/odot/todo"); + rename("odot.tmp", "/home/huck/.local/state/odot/todo"); return; } -void rem(FILE *fp){ +void rem(struct task t, FILE *fp){ char *s = malloc(MAXLINE * sizeof(char)); - FILE *fc = fopen("/tmp/odot", "w"); + FILE *buf = fopen("odot.tmp", "w"); + int i = 0; while (fgets(s, MAXLINE, fp) != NULL){ s[strlen(s) - 1] = 0; - if (strcmp(note, s) != 0){ - fputs(strcat(s,"\n"),fc); + if (strcmp(t.task, s) != 0){ + fputs(strcat(s,"\n"),buf); + } else { + i++; } } fclose(fp); - fclose(fc); + fclose(buf); + + remove ("/home/huck/.local/state/odot/todo"); + rename("odot.tmp", "/home/huck/.local/state/odot/todo"); - remove (TODOLIST); - rename("/tmp/odot", TODOLIST); + if (i == 0){ + dialogue("Task not found", t.task, YELLOW); + printf("Add to list?"); + if(check() == 0){ + add(t,fp); + } + } free(s); } -void show(FILE *fp){ +void show(char *group, FILE *fp){ char *c = malloc(sizeof(char)); - while (fgets(c, 1, fp) != NULL ) - formattask(gettask(fp)); + while (fgets(c, 1, fp) != NULL ){ + if (strcmp(group, "all") == 0 || strcmp(gettask(fp).group, group) == 0){ + formattask(gettask(fp)); + } + } free(c); } diff --git a/func.c b/func.c deleted file mode 100644 index 1991b9e..0000000 --- a/func.c +++ /dev/null @@ -1,32 +0,0 @@ -#include "odot.h" - -enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; - - /* Returns: - 0 - Nothing matches - 1 - Task matches - 2 - Group matches - 3 - Both match - */ -int listcheck(struct task t, FILE *fp){ - int i; - i += (strcmp(t.task,gettask(fp).task) == 0) ? 1 : 0; - i += (strcmp(t.group,gettask(fp).group) == 0) ? 2 : 0; - return i; -} - - -char *gettime(void){ - return NULL; -} - -int linecount(FILE *fp){ - int i = 0; - char c; - while ((c = fgetc(fp)) != EOF){ - if (c == '\n') - i++; - } - fseek(fp,0,SEEK_SET); - return i; -} diff --git a/input.c b/input.c index 0cc316a..0cb2c50 100644 --- a/input.c +++ b/input.c @@ -1,17 +1,27 @@ #include "odot.h" -extern char *note, *group; -extern int urgency; - -char *getnote(int n, char *arg[]){ +struct task getnote(int n, char *arg[], char *group){ char *s = malloc(MAXLINE * sizeof(char)); + struct task tmp; + + if (n == 1) + printf("\nreturn from note\n"); + return tmp; + -/* adds word to note if it doesn't start with - */ - while(--n > 0 && (*++arg)[0] != '-'){ + while(n-- > 0){ + printf("\n%i-nloop\n",n); + if (*arg[0] != '-'){ strcat(s, *arg); strcat(s, (n > 1) ? " " : ""); + } else if (strcmp(*arg,"-g") == 0){ + strcpy(group, *arg); + } } - return s; + strcpy(tmp.task, s); + strcpy(tmp.group, group); + free(s); + return tmp; } /* uses a 3 bit number to represent options @@ -20,23 +30,23 @@ char *getnote(int n, char *arg[]){ 4 - remove from list */ short getopt(int n, char *arg[]){ - char *c; short options; - + + printf("\nreturn1\n"); /* show list if no arguments given */ if (n == 1) return 1; + printf("\ncheckopt\n"); while (--n > 0 && (*++arg)[0] == '-'){ /* if theres a d delete, otherwise add */ - options += strchr(*arg, 'd') ? 4 : 2; options += strchr(*arg, 's') ? 1 : 0; - /* if theres a g then add the next argument as a group */ - if (strchr(*arg,'g') != NULL){ - strcpy(group,*++arg); - } + options += strchr(*arg, 'n') ? 2 : 0; + options += strchr(*arg, 'd') ? 4 : 0; } - + printf("%i", options); + if ((options - 5) > 0) + error(2); return options; } diff --git a/main.c b/main.c index a1134e2..9b86cd1 100644 --- a/main.c +++ b/main.c @@ -1,10 +1,84 @@ #include "odot.h" -extern char *note, *o; -extern int urgency; - int main(int argc, char *argv[]){ + printf("\nstart\n"); + struct task note; + short opt; + FILE *fp; + char *group = malloc(MAXLINE*sizeof(char)); + + printf("\nfopen\n"); + fp = fopen("/home/huck/.local/state/odot/todo", "w+"); + if (!fp){ + error(1); + } + + printf("\ngetopt\n"); + opt = getopt(argc, argv); + + printf("\ngetnote\n"); + note = getnote(argc, argv, group); + + if (opt >= 4){ + printf("\nrem\n"); + rem(note, fp); + } else { + printf("\nadd\n"); + add(note, fp); + } + if (opt % 2 != 0){ + printf("\nshow\n"); + show(group, fp); + } + + free(group); + fclose(fp); return 0; } +void error(int err){ + switch (err) { + case 1: + fprintf(stderr,"ERROR: COULD NOT ACCESS FILE: %s\n", "/home/huck/.local/state/odot/todo"); + break; + case 2: + fprintf(stderr,"ERROR: CANT ADD AND REMOVE SAME TASK\n"); + break; + } + exit(err); +} + +void dialogue(char *m1, char *m2, int c){ + printf("\033[1;3%im%s\033[0m: %s\n", c, m1, m2); + return; +} + +void formattask(struct task t){ + printf("* %s\t%s\t%i", t.task, t.group, t.date); +} + + /* Returns: + 0 - Nothing matches + 1 - Task matches + 2 - Group matches + 3 - Both match + */ +int listcheck(struct task t, FILE *fp){ + int i; + i += (strcmp(t.task,gettask(fp).task) == 0) ? 1 : 0; + i += (strcmp(t.group,gettask(fp).group) == 0) ? 2 : 0; + return i; +} + +char *gettime(void){ + return NULL; +} + +/* returns 0 for yes and 1 for no */ +int check(void){ + printf("Continue? [y/n] (y):"); + if (((char) getchar()) == 'n') + return 1; + return 0; +} diff --git a/odot b/odot new file mode 100755 index 0000000..1c93fb8 Binary files /dev/null and b/odot differ diff --git a/odot.h b/odot.h index b881802..78c3548 100644 --- a/odot.h +++ b/odot.h @@ -3,10 +3,10 @@ #include #include #include +#define TODOLIST "/home/huck/.local/state/odot/todo" #define MAXLINE 1000 #define TIME "%H:%M %m-%d-%y" -#define TODOLIST "/home/huck/.local/state/odot/todo" struct task { char *task; @@ -14,12 +14,12 @@ struct task { char *group; }; -char *getnote(int, char *[]); +struct task getnote(int, char *[], char *); short getopt(int, char *[]); void add(struct task, FILE *); -void rem(FILE *); -void show(FILE *); +void rem(struct task, FILE *); +void show(char *group, FILE *); int listcheck(struct task, FILE *); int geturgency(int); @@ -28,13 +28,10 @@ char *gettime(void); void dialogue(char *, char *, int); void formattask(struct task t); void error(int); - -int linecount(FILE *); +int check(void); struct task maketask(char *, char *); void puttask(struct task n, FILE*); struct task gettask(FILE *); -char *note, *o; -FILE *fp; - +enum color {BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE}; diff --git a/structure.c b/structure.c deleted file mode 100644 index 65828eb..0000000 --- a/structure.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "odot.h" - -extern FILE *fp; - - diff --git a/test b/test new file mode 100755 index 0000000..e05525d Binary files /dev/null and b/test differ