#include <stdio.h>
-typedef struct block_reg_t{
- int block;
- int reg;
-}block_reg_t;
-int main ( )
+#include <string.h>
+#include "emufs.h"
+
+int main()
{
- struct block_reg_t r;
-
- printf("sizeof(struct block_reg_t) = %d\n", sizeof(struct block_reg_t));
- printf("sizeof(r) = %d\n", sizeof(r));
+ EMUFS *fp;
+ char a[100];
+ char c[100];
+ int n1, n2;
+ char b[100];
+
+ strcpy(a, "1234567890");
+ strcpy(c, "REGISTRO NUMERO 2. ESTE REGISTRO ES MUCHO MAS LARGO QUE EL UNO");
+
+ fp = emufs_crear("articulos", T3, 512, 100);
+
+ n1 = fp->grabar_registro(fp, a, 100);
+ n2 = fp->grabar_registro(fp, c, 100);
+
+ printf("ID1 = %d\n", n1);
+ printf("ID2 = %d\n", n2);
+
+ fp->leer_registro(fp, n1, b, 100);
+
+ printf("Ok\n");
+ printf("Recuperado : %s\n", b);
+
+ emufs_destruir(fp);
return 0;
}