28 lines
978 B
Markdown
28 lines
978 B
Markdown
# Computersystems Coursework Text Editor
|
|
|
|
|
|
## Usage:
|
|
|
|
### Compiling:
|
|
|
|
for this program to compile you need the following C libraries on your system:
|
|
- ncurses
|
|
- Linux: usually preinstalled - otherwise installation depends on distro
|
|
- Mac
|
|
> brew install ncurses
|
|
- Windows:
|
|
- This may be more difficult to setup and requires additional research
|
|
|
|
compiling with GCC:
|
|
> gcc main.c editor.c dynstr.c -lncurses -o <binary-name>
|
|
|
|
### Running:
|
|
```bash
|
|
./<binary-name> open <$file> # opens the specified file in the editor
|
|
./<binary-name> new <$file> # creates a new file with <filename> as the name
|
|
./<binary-name> del <$file> # deletes the specified file
|
|
./<binary-name> copy <$file> <$newpath> # copies $file to the location $newpath
|
|
./<binary-name> move <$file> <$newpath> # moves $file to the location $newpath
|
|
./<binary-name> len <$file> # prints the length of $file
|
|
./<binary-name> log <$file> # prints the change history of $file
|
|
``` |