X-Git-Url: https://git.llucax.com/z.facultad/75.06/emufs.git/blobdiff_plain/60505ae8ce77483ea58c6829c20de89f1c01afaf..aefc56334e3d677ea597d8268f8a6f203acde2cd:/emufs/tipo3_main.c diff --git a/emufs/tipo3_main.c b/emufs/tipo3_main.c index 4758f73..5ec945d 100644 --- a/emufs/tipo3_main.c +++ b/emufs/tipo3_main.c @@ -1,3 +1,37 @@ +/* vim: set noexpandtab tabstop=4 shiftwidth=4: + *---------------------------------------------------------------------------- + * emufs + *---------------------------------------------------------------------------- + * This file is part of emufs. + * + * emufs is free software; you can redistribute it and/or modify it under the + * terms of the GNU General Public License as published by the Free Software + * Foundation; either version 2 of the License, or (at your option) any later + * version. + * + * emufs is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with emufs; if not, write to the Free Software Foundation, Inc., 59 Temple + * Place, Suite 330, Boston, MA 02111-1307 USA + *---------------------------------------------------------------------------- + * Creado: mié mar 31 17:26:46 ART 2004 + * Autores: Nicolás Dimov + *---------------------------------------------------------------------------- + * + * $Id: command.cpp 220 2003-11-19 23:10:40Z luca $ + * + */ + +/** \file + * + * Prueba de archivo \ref tipo3.h "tipo3". + * + */ + #include #include #include "emufs.h" @@ -5,7 +39,7 @@ int main(int argc, char *argv[]) { EMUFS *fp; - int n1, n2, n3, n4, n5, n6, n7; + int n1, n2, n3, n4, n5, n6, n7, n8; char a[100]; char b[100]; char c[100]; @@ -14,6 +48,7 @@ int main(int argc, char *argv[]) char f[100]; char g[100]; char h[100]; + char i[100]; if (argc != 2) { printf("Modo de uso : %s tam_bloque\n", argv[0]); @@ -32,7 +67,7 @@ int main(int argc, char *argv[]) strcpy(f, "yo soy F"); strcpy(g, "me llamo G y quiero estar en el bloque 1"); strcpy(h, "un registro nuevo que se llama H, acompania a G en el bloque 1"); - + strcpy(i, "me argrego despues de borrar a un registro"); fp = emufs_crear("articulos", T3, atoi(argv[1]), 100); @@ -54,7 +89,8 @@ int main(int argc, char *argv[]) fp->borrar_registro(fp, n4, 100); - fp->leer_registro(fp, n7, b, 100); + n8 = fp->grabar_registro(fp, i, 100); + fp->leer_registro(fp, n8, b, 100); printf("Recuperado : %s\n", b);