GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — AVIS/fire-gem.c at main · mercwar/AVIS

Expand file tree

/

fire-gem.c

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
116 lines (96 loc) · 3.57 KB
/

fire-gem.c

Copy path

File metadata and controls

116 lines (96 loc) · 3.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
/*******************************************************************************
* TYPE: ENGINE | CLASS: FORGE-CORE | NAME: fire-gem.c
* IDENTITY: VERSION 2.1 // WINDOWS_STRIKE_CORE // HAHA!
* ROLE: Scan FORGE, Strike to EXE, and Execute. No .sh, no .yml logic.
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <direct.h> // Required for _mkdir on Windows
#define FORGE_DIR "VERSION 2/ASM/FORGE/OUT"
#define GEM_OUT "VERSION 2/ASM/FIRE-GEM/OUT"
#define LOG_PATH "VERSION 2/ASM/fire-gem.log"
// ------------------------------------------------------------
// LOGGING SYSTEM: FLUSH EVERY LINE TO PREVENT EMPTY LOGS
// ------------------------------------------------------------
void log_line(const char *text) {
FILE *f = fopen(LOG_PATH, "a");
if (!f) return;
fprintf(f, "%s\n", text);
printf("%s\n", text); // Output to GitHub Actions console
fclose(f);
}
// ------------------------------------------------------------
// FORGE COMMAND: CALLS GCC TO STRIKE BINARY
// ------------------------------------------------------------
void compile_c(const char *input, const char *output) {
char cmd[1024];
// Striking with -O2 optimization for the robot
sprintf(cmd, "gcc \"%s\" -O2 -o \"%s\"", input, output);
system(cmd);
}
// ------------------------------------------------------------
// EXECUTION COMMAND: RUNS THE NEWLY FORGED EXE
// ------------------------------------------------------------
void run_bin(const char *path) {
char cmd[1024];
sprintf(cmd, "\"%s\"", path);
system(cmd);
}
// ------------------------------------------------------------
// MASTER ENGINE
// ------------------------------------------------------------
int main(void) {
// 1. SEAT THE VAULTS (Recursive creation for Windows)
_mkdir("VERSION 2");
_mkdir("VERSION 2/ASM");
_mkdir("VERSION 2/ASM/FORGE");
_mkdir("VERSION 2/ASM/FORGE/OUT");
_mkdir("VERSION 2/ASM/FIRE-GEM");
_mkdir("VERSION 2/ASM/FIRE-GEM/OUT");
// 2. RESET LOG FOR NEW PULSE
FILE *reset = fopen(LOG_PATH, "w");
if (reset) {
fprintf(reset, "[AVIS_V2] IDENTITY VERIFIED: FORGE INITIATED\n");
fclose(reset);
}
// 3. OPEN THE FORGE FOR DISCOVERY
DIR *d = opendir(FORGE_DIR);
if (!d) {
log_line("[AVIS_V2] ERROR: FORGE VAULT NOT ACCESSIBLE.");
return 1;
}
struct dirent *ent;
int found = 0;
// 4. SCAN AND STRIKE LOOP
while ((ent = readdir(d)) != NULL) {
const char *name = ent->d_name;
size_t len = strlen(name);
// Filter: Target only .c files, skip . and ..
if (len < 3 || strcmp(name + len - 2, ".c") != 0)
continue;
found = 1;
char src[512], dst[512], outname[256];
// Path Formatting
snprintf(src, sizeof(src), "%s/%s", FORGE_DIR, name);
snprintf(outname, sizeof(outname), "%.*s.exe", (int)(len - 2), name);
snprintf(dst, sizeof(dst), "%s/%s", GEM_OUT, outname);
// LOG AND STRIKE
char msg[1024];
sprintf(msg, "[AVIS_V2] STRIKING: %s -> %s", name, outname);
log_line(msg);
compile_c(src, dst);
// EXECUTE THE PULSE
sprintf(msg, "[AVIS_V2] EXECUTING: %s", outname);
log_line(msg);
run_bin(dst);
}
closedir(d);
if (!found) {
log_line("[AVIS_V2] VAULT EMPTY: DROP .C FILES INTO FORGE/OUT TO TEACH ROBOT.");
} else {
log_line("[AVIS_V2] FORGE CYCLE COMPLETE. wm_macro_ack.");
}
return 0;
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.