-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d521f28
commit ef96d5d
Showing
23 changed files
with
168 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
release/ | ||
debug/ | ||
*.txt | ||
|
||
resources/bundler | ||
resources/bundler.exe | ||
resources/bundle.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Resource files for nino | ||
|
||
## syntax | ||
Files in this folder will be bundled in the binary for portability. | ||
If you would like to make your own syntax files, | ||
you can put them in: | ||
- Linux: `~/.config/nino/syntax` | ||
- Windows: `~/.nino/syntax` | ||
|
||
## themes | ||
These are some example themes. | ||
You can copy them to the configuration directory like normal configuration files. | ||
|
||
Configuration Directory: | ||
- Linux: `~/.config/nino` | ||
- Windows: `~/.nino` | ||
|
||
To apply the theme, run it with the `exec` command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <stdio.h> | ||
|
||
#define ARGS_SHIFT() \ | ||
{ \ | ||
argc--; \ | ||
argv++; \ | ||
} \ | ||
while (0) | ||
|
||
int main(int argc, char* argv[]) { | ||
if (argc < 3) { | ||
fprintf(stderr, "Usage: %s <output file> files...\n", argv[0]); | ||
return 1; | ||
} | ||
|
||
ARGS_SHIFT(); | ||
|
||
FILE* out = fopen(argv[0], "w"); | ||
if (!out) { | ||
fprintf(stderr, "Failed to open %s to write.\n", argv[1]); | ||
return 1; | ||
} | ||
|
||
ARGS_SHIFT(); | ||
|
||
fprintf(out, "#ifndef BUNDLE_H\n"); | ||
fprintf(out, "#define BUNDLE_H\n\n"); | ||
|
||
for (int i = 0; i < argc; i++) { | ||
FILE* fp = fopen(argv[i], "r"); | ||
if (!fp) { | ||
fprintf(stderr, "Failed to open %s to read.\n", argv[i]); | ||
return 1; | ||
} | ||
|
||
fprintf(out, "const char bundle%d[] = {", i); | ||
|
||
int index = 0; | ||
|
||
int byte; | ||
while ((byte = fgetc(fp)) != EOF) { | ||
if (index % 10 == 0) { | ||
fprintf(out, "\n "); | ||
} | ||
fprintf(out, "0x%02X, ", byte); | ||
index++; | ||
} | ||
|
||
fprintf(out, "\n};\n\n"); | ||
} | ||
|
||
fprintf(out, "const char* bundle[] = {\n"); | ||
for (int i = 0; i < argc; i++) { | ||
fprintf(out, " bundle%d,\n", i); | ||
} | ||
fprintf(out, "};\n\n"); | ||
|
||
fprintf(out, "#endif\n"); | ||
|
||
return 0; | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters