Compare commits

...

6 Commits

Author SHA1 Message Date
a12faeb9e3 Minor changes 2022-10-15 09:24:19 -05:00
d4687c5b78 Updated header file to use default directories 2022-10-15 09:23:52 -05:00
25b740dce1 Updated header file to use default directories 2022-10-15 09:23:31 -05:00
e0fdcb555d Updated README 2022-10-15 09:22:46 -05:00
c5c46ebd36 Added install script for ncurses 2022-10-15 09:21:00 -05:00
0a869bd24d Updated Makefile 2022-10-15 09:20:45 -05:00
6 changed files with 29 additions and 5 deletions

View File

@@ -1,2 +1,6 @@
program3-4: program3-4.c texted.c fileman.c
gcc program3-4.c texted.c fileman.c -o program3-4 -Llib -lncursest -Wl,-rpath=lib
gcc program3-4.c texted.c fileman.c -o program3-4 -lncursest
.PHONY: full
full:
./installfull.sh
make

View File

@@ -5,8 +5,8 @@ It uses a custom-compiled version of ncurses, and will likely crash if used wit
<br>
The following steps are used to compile the version of ncurses that this program needs:
- Grab the ncurses source code from [here](https://invisible-mirror.net/archives/ncurses/ncurses-6.3.tar.gz)
- Run the configure script with the `--with-pthread --with-shared` options.
- Run `make` and `make install`.
- Run the configure script (for ncurses) with the `--with-pthread --with-shared` options.
- Run `make` and `make install` to compile and install the library.

View File

@@ -1,6 +1,6 @@
#ifndef FILEMAN_H_
#define FILEMAN_H_
#include "include/curses.h"
#include <curses.h>
#include <sys/stat.h>
#include <string.h>
#include <dirent.h>

19
installfull.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
FILE=/lib/libncursest.so
WORK_DIR="${PWD}"
CORES="$(nproc)"
CURSES_URL="https://invisible-mirror.net/archives/ncurses/current/ncurses.tar.gz"
if test -f "$FILE"; then
echo "$FILE exists; skipping ncurses compile."
else
echo "$FILE does not exist, fetching and compiling ncurses source code now..."
mkdir ncurses
wget -q -O- "${CURSES_URL}" | tar -xz -C ncurses
echo "Fetched ncurses source code from ${CURSES_URL}..."
cd ncurses/*/
echo "Runnning configure script..."
./configure --with-pthread --with-shared > /dev/null
echo "Running make..."
make -j"${CORES}" > /dev/null
fi

View File

@@ -290,6 +290,7 @@ int main(int argc,char** argv) {
if (i == highlighted) {
wattron(mainwin,A_REVERSE);
}
memset(tempDir,0,strlen(tempDir));
strcpy(tempDir,dir);
strcat(tempDir, (char *)(*(fileList+i)));

View File

@@ -1,6 +1,6 @@
#ifndef TEXTED_H_
#define TEXTED_H_
#include "include/curses.h"
#include <curses.h>
#include <string.h>
#include <stdlib.h>