mirror of
https://github.com/brmlab/brmbar.git
synced 2025-12-15 12:14:02 +01:00
Separated I/O operations into itemio.c
Signed-off-by: Cestmir Houska <czestmyr@gmail.com>
This commit is contained in:
parent
842a6eb13f
commit
bf838ea046
4 changed files with 43 additions and 19 deletions
15
itemio.c
Normal file
15
itemio.c
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#include <stdio.h>
|
||||
#include "itemio.h"
|
||||
|
||||
struct item items[ITEM_MAXNUM];
|
||||
|
||||
void fill_items()
|
||||
{
|
||||
char buf[128];
|
||||
FILE *f = fopen("items.txt", "r");
|
||||
while (fgets(buf, 128, f)) {
|
||||
printf("%s\n", buf);
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue