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

3
ccc.c
View file

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

View file

@ -19,10 +19,10 @@ In COLS:
0 will make them equal (at the center),
15 will make files bigger
-15 will make preview bigger */
#define WINDOW_OFFSET -20
#define WINDOW_OFFSET 0
/* 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 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)
return;
/* marked stuff doesn't work with this
free(list->items[index].name);
free(list->items[index].path);
free(list->items[index].type);
free(list->items[index].stats);
free(list->items[index].icon);
*/
for (long i = index; i < list->length - 1; i++)
list->items[i] = list->items[i + 1];