Compare commits

..

No commits in common. "132f4887edfbd4787b45423678380417348298da" and "3e95b7ab9c8b86ea582edb7658da56c04a789218" have entirely different histories.

4 changed files with 10 additions and 13 deletions

View file

@ -1,6 +1,7 @@
.POSIX: .POSIX:
.SUFFIXES: .SUFFIXES:
CC = cc
VERSION = 1.0 VERSION = 1.0
TARGET = ccc TARGET = ccc
MANPAGE = $(TARGET).1 MANPAGE = $(TARGET).1
@ -9,9 +10,9 @@ PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man/man1 MANDIR = $(PREFIX)/share/man/man1
LDFLAGS != pkg-config --libs ncursesw # Flags
INCFLAGS != pkg-config --cflags ncursesw LDFLAGS = $(shell pkg-config --libs ncursesw)
CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall $(INCFLAGS) CFLAGS = -O3 -march=native -mtune=native -pipe -s -flto -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 $(shell pkg-config --cflags ncursesw)
SRC = ccc.c util.c file.c icons.c SRC = ccc.c util.c file.c icons.c
@ -34,11 +35,11 @@ install: $(TARGET)
chmod 644 $(DESTDIR)$(MANDIR)/$(MANPAGE) chmod 644 $(DESTDIR)$(MANDIR)/$(MANPAGE)
uninstall: uninstall:
rm $(DESTDIR)$(BINDIR)/$(TARGET) $(RM) $(DESTDIR)$(BINDIR)/$(TARGET)
rm $(DESTDIR)$(MANDIR)/$(MANPAGE) $(RM) $(DESTDIR)$(MANDIR)/$(MANPAGE)
clean: clean:
rm $(TARGET) $(RM) $(TARGET)
all: $(TARGET) all: $(TARGET)

3
ccc.c
View file

@ -1075,9 +1075,6 @@ void delete_files()
change_dir(cwd, 0, 0); change_dir(cwd, 0, 0);
} }
} }
for (int i = 0; i < marked->length; i++) {
arraylist_remove(marked, 0);
}
} else { } else {
wpprintw("TODO: implement hard delete"); wpprintw("TODO: implement hard delete");
} }

View file

@ -19,10 +19,10 @@ In COLS:
0 will make them equal (at the center), 0 will make them equal (at the center),
15 will make files bigger 15 will make files bigger
-15 will make preview bigger */ -15 will make preview bigger */
#define WINDOW_OFFSET -20 #define WINDOW_OFFSET 0
/* Options */ /* Options */
#define DRAW_BORDERS false /* draw borders around windows */ #define DRAW_BORDERS true /* draw borders around windows */
#define DRAW_PREVIEW true /* draw file preview */ #define DRAW_PREVIEW true /* draw file preview */
#define SHOW_HIDDEN true /* show hidden files/dotfiles at startup */ #define SHOW_HIDDEN true /* show hidden files/dotfiles at startup */

3
file.c
View file

@ -60,13 +60,12 @@ void arraylist_remove(ArrayList *list, long index)
if (index >= list->length) if (index >= list->length)
return; return;
/* marked stuff doesn't work with this
free(list->items[index].name); free(list->items[index].name);
free(list->items[index].path); free(list->items[index].path);
free(list->items[index].type); free(list->items[index].type);
free(list->items[index].stats); free(list->items[index].stats);
free(list->items[index].icon); free(list->items[index].icon);
*/
for (long i = index; i < list->length - 1; i++) for (long i = index; i < list->length - 1; i++)
list->items[i] = list->items[i + 1]; list->items[i] = list->items[i + 1];