MCPcopy Create free account
hub / github.com/TASEmulators/fceux / DINF

Function DINF

src/unif.cpp:171–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171static int DINF(FCEUFILE *fp) {
172 char name[100], method[100];
173 uint8 d, m;
174 uint16 y;
175 int t;
176
177 if (FCEU_fread(name, 1, 100, fp) != 100)
178 return(0);
179 if ((t = FCEU_fgetc(fp)) == EOF) return(0);
180 d = t;
181 if ((t = FCEU_fgetc(fp)) == EOF) return(0);
182 m = t;
183 if ((t = FCEU_fgetc(fp)) == EOF) return(0);
184 y = t;
185 if ((t = FCEU_fgetc(fp)) == EOF) return(0);
186 y |= t << 8;
187 if (FCEU_fread(method, 1, 100, fp) != 100)
188 return(0);
189 name[99] = method[99] = 0;
190 FCEU_printf(" Dumped by: %s\n", name);
191 FCEU_printf(" Dumped with: %s\n", method);
192 {
193 const char *months[12] = {
194 "January", "February", "March", "April", "May", "June", "July",
195 "August", "September", "October", "November", "December"
196 };
197 FCEU_printf(" Dumped on: %s %d, %d\n", months[(m - 1) % 12], d, y);
198 }
199 return(1);
200}
201
202static int CTRL(FCEUFILE *fp) {
203 int t;

Callers

nothing calls this directly

Calls 3

FCEU_freadFunction · 0.85
FCEU_fgetcFunction · 0.85
FCEU_printfFunction · 0.85

Tested by

no test coverage detected