brmbar-github/brmbar.c
Cestmir Houska 564f8ab87c brmbar.c uses definitions now
Signed-off-by: Cestmir Houska <czestmyr@gmail.com>
2011-04-22 02:24:06 +02:00

25 lines
358 B
C

#include <stdio.h>
#include "defines.h"
struct item {
char ean[EAN_MAXLEN];
char name[NAME_MAXLEN];
int price;
} 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);
}
int main()
{
fill_items();
return 0;
}