guix manifest upgrade and bug fixes master v1.0.3
authoralex <[email protected]>
Fri, 24 Mar 2023 04:43:08 +0000 (21:43 -0700)
committeralex <[email protected]>
Sat, 2 Dec 2023 08:22:32 +0000 (00:22 -0800)
.gitignore
events.scm [deleted file]
inc/args.h
manifest.scm [new file with mode: 0644]
src/file/mv.c

index 24a31b4be81c64e691b559a74a31d1bb67818ed5..737de469925f1993b39371a12ba7b876a3b6107b 100644 (file)
@@ -22,6 +22,7 @@ config.h.in~
 config.log
 config.status
 configure
+configure~
 configure.scan
 Makefile
 Makefile.in
diff --git a/events.scm b/events.scm
deleted file mode 100644 (file)
index 9520ceb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-(define-module (infiniteadaptability packages events)
-  #:use-module (gnu packages autotools)
-  #:use-module (gnu packages gcc)
-  #:use-module (gnu packages sqlite)
-  #:use-module (guix git-download)
-  #:use-module (guix build-system gnu)
-  #:use-module (guix licenses)
-  #:use-module (guix packages))
-
-(define-public events
-  (let ((version "1.1.0")
-        (commit "1ac4b76c722fb3764a3a366663ae689030a1b49e")
-        (revision 0))
-    (package
-      (name "events")
-      (version (if (zero? revision) version
-                   (string-append version "-"
-                                  (number->string revision) "."
-                                  (string-take commit 7))))
-      (source (origin
-                (method git-fetch)
-                (uri (git-reference
-                      (url "https://git.infiniteadaptability.org/events.git")
-                      (commit commit)))
-                (sha256
-                 (base32
-                  "01lvncpw3ajikn6mz3ni2himaa1056p3b7prfhx494kiqdizpikf"))
-                (file-name (string-append "events-" version "-checkout"))))
-      (build-system gnu-build-system)
-      (arguments
-       (list #:parallel-tests? #f))
-      (native-inputs `(("autoconf" ,autoconf)
-                       ("automake" ,automake)))
-      (home-page "https://git.infiniteadaptability.org/events")
-      (synopsis "utility for managing events")
-      (description "command-line utility for managing events.")
-      (license unlicense))))
-
-events
index ebda10bd79b05de84df3134be77725825e444696..21f5a2dc15bb9bba76e390bf1db35512b7a25dee 100644 (file)
@@ -17,6 +17,6 @@ enum sub_command {
        SUB_COMMAND_VALIDATE
 };
 
-int args(int,char**);
+enum sub_command args(int,char**);
 
 #endif
diff --git a/manifest.scm b/manifest.scm
new file mode 100644 (file)
index 0000000..59adb3b
--- /dev/null
@@ -0,0 +1,7 @@
+(specifications->manifest (list "gcc-toolchain"
+                                "autoconf"
+                                "automake"
+                                "make"
+                                "gdb"
+                                "universal-ctags"
+                                "valgrind"))
index 688ab97de9cd8893be54901ab58d5aa3a3fa5267..22506b75f6ed0f5c44e817632d9be2d57d154737 100644 (file)
@@ -1,10 +1,26 @@
 #include<file.h>
 
 int file_move(const char *tempname) {
-       if(rename(tempname,global_options.file)==-1) {
-               perror("rename");
+       FILE *src, *to;
+
+       src = fopen(tempname, "r");
+       if(NULL==src) {
+               perror("fopen");
+               return -1;
+       }
+
+       to = fopen(global_options.file, "w");
+       if(NULL==to) {
+               perror("fopen");
                return -1;
        }
 
+       if(file_pipe(to, src)<0) { return -1; }
+
+       if(fclose(src)!=0) { return -1; }
+       if(fclose(to)!=0) { return -1; }
+
+       if(remove(tempname)!=0) { return -1; }
+
        return 1;
 }