Added image, updated bunch of stuff...
This commit is contained in:
parent
91eec541ad
commit
c93a9f6e68
29
README.md
29
README.md
@ -1,3 +1,30 @@
|
|||||||
# xighlight
|
# xighlight
|
||||||
|
|
||||||
Xighlight C source code...
|
xighlight -- Program for highlighting C source code in terminal.
|
||||||
|
|
||||||
|
- Quickly written program to test out xtandard and xyntax, doesn't handle files, instead it records from standard input...
|
||||||
|
- For now, 'xighlight' only works on ANSI C source code, without 'typedef' keyword, both will change in the future, and CLA will be added...
|
||||||
|
- Everything related to my libraries is clean of all warning options on Clang, GCC and Valgrind.
|
||||||
|
|
||||||
|
Compiling:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sh compile.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Installing:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ sudo sh install.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Using:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ cat my_c_program.c | xighlight
|
||||||
|
$ xighlight < my_c_program.c
|
||||||
|
```
|
||||||
|
|
||||||
|
This is what it prints to standard output, when standard input is C source code:
|
||||||
|
|
||||||
|
![alternative text]("c_hello.png");
|
||||||
|
BIN
c_hello.png
Normal file
BIN
c_hello.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 90 KiB |
@ -37,10 +37,10 @@ int main (void) {
|
|||||||
(void) syntax_define (0, 1, c_keywords [word], separator, '\0', COLOUR_BLUE, EFFECT_BOLD);
|
(void) syntax_define (0, 1, c_keywords [word], separator, '\0', COLOUR_BLUE, EFFECT_BOLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(void) syntax_define (1, 1, "_", separator, '\0', COLOUR_GREY, EFFECT_BOLD);
|
||||||
(void) syntax_define (1, 1, "0123456789", separator, '\0', COLOUR_CYAN, EFFECT_BOLD);
|
(void) syntax_define (1, 1, "0123456789", separator, '\0', COLOUR_CYAN, EFFECT_BOLD);
|
||||||
(void) syntax_define (1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", separator, '\0', COLOUR_PINK, EFFECT_ITALIC);
|
(void) syntax_define (1, 1, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", separator, '\0', COLOUR_PINK, EFFECT_ITALIC);
|
||||||
(void) syntax_define (1, 1, "abcdefghijklmnopqrstuvwxyz", separator, '\0', COLOUR_WHITE, EFFECT_ITALIC);
|
(void) syntax_define (1, 1, "abcdefghijklmnopqrstuvwxyz", separator, '\0', COLOUR_WHITE, EFFECT_ITALIC);
|
||||||
(void) syntax_define (0, 1, "_", separator, '\0', COLOUR_PINK, EFFECT_BOLD);
|
|
||||||
|
|
||||||
buffer = record ();
|
buffer = record ();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user