kee

Offline IOU signer with QR as transport
git clone https://holbrook.no/src/kee
Info | Log | Files | Refs | README | LICENSE

commit 0b04881cbd46617dbfe902d9d0e92ade940e07be
parent 31d7e0fb51baf658999cb7b5a2e82a26eb9b4654
Author: lash <dev@holbrook.no>
Date:   Sun, 26 May 2024 20:53:25 +0100

Implement menu reverse lookup as implementation

Diffstat:
Msrc/aux/beamenu/gen.c | 6+++---
Msrc/gtk/Makefile | 7++++---
2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/aux/beamenu/gen.c b/src/aux/beamenu/gen.c @@ -211,7 +211,7 @@ int write_data() { } l = beamenu_export(buf, BEAMENU_EXIT_SIZE); - f = open("beamenu.dat", O_WRONLY | O_CREAT, S_IRWXU); + f = open("beamenu.dat", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); while (l > 0) { c = write(f, buf, l); if (!c) { @@ -239,7 +239,7 @@ int write_defs() { int r; int i; - f = open("beamenu_defs.h", O_WRONLY | O_CREAT, S_IRWXU); + f = open("beamenu_defs.h", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); r = 0; p = "#ifndef BEAMENU_DEFS_H_\n#define BEAMENU_DEFS_H_\n\n"; @@ -300,7 +300,7 @@ int write_impl() { int l; int f; - f = open("beamenu_defs.c", O_WRONLY | O_CREAT, S_IRWXU); + f = open("beamenu_defs.c", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); r = 0; p = "char *beamenu_dst_r[] = {\n"; diff --git a/src/gtk/Makefile b/src/gtk/Makefile @@ -1,4 +1,4 @@ -OBJS := $(patsubst %.c,%.o,$(filter-out main.c,$(wildcard *.c))) +OBJS := $(patsubst %.c,%.o,$(filter-out main.c beamenu_defs.c,$(wildcard *.c))) LINKOBJS := $(wildcard ../*.o) $(OBJS) INCLUDES := -I.. -I../aux/include CFLAGS += `pkg-config --cflags gtk4 gstreamer-1.0 libtasn1 libqrencode zbar` $(INCLUDES) -g3 -Wall @@ -7,7 +7,7 @@ LDFLAGS += $(LIBS) AUXLIBS := `pkg-config --libs kee` all: menu resource $(OBJS) - $(CC) $(CFLAGS) main.c -o a.out $(LINKOBJS) $(LDFLAGS) $(AUXLIBS) + $(CC) $(CFLAGS) main.c -o a.out $(LINKOBJS) $(LDFLAGS) $(AUXLIBS) beamenu_defs.o %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ $(LDFLAGS) @@ -20,7 +20,7 @@ clean: rm -vf a.out rm -vf a_dev.out rm -vf resources.c - rm -vf beamenu_defs.h + rm -vf beamenu_defs.* rm -vf beamenu.dat make -C tests clean @@ -29,3 +29,4 @@ resource: menu: ../aux/beamenu/beamenu_gen menu.txt + $(CC) $(CFLAGS) -c beamenu_defs.c -o beamenu_defs.o