gnupic@linuxhacker.org

gnupic@linuxhacker.org


Subject: Rep:Re: Missing #include in gputils (gpreadhex.h)
From: Carlos Nieves
Date: Wed, 29 Jan 2003 21:28:28 GMT

Ok, despite of it's not really necessary for me, I'm not sure about this
issue.
So I just try out a little program using libgputils.h. 
This is my little program:
--------------------------------

#include <stdio.h>
#include <unistd.h>
#include "libgputils.h"

int main () {

  struct hex data data;
  MemBlock *memory;
  unsigned int i;

  memory = i memory create();
  data = readhex("/home/cnieves/pic2.hex", memory);

  printf ("Error was: %i\n", data.error);
  printf ("Read %i bytes of memory\n", data.size);
  for (i = 0; i <= 10; i++)
    printf ("Address %u: %04X\n", i, i memory get (memory, i) );


}

--------------------------------

Compiled it with:
gcc *.c -o prueba -I . -DHAVE STRING H -DHAVE MALLOC H

En el fichero incluído de libgputils.h:36,
                 de main.c:4:
gputils/gpreadhex.h:25: el campo `hex format' tiene tipo de dato
incompleto

Which is the same error I got yesterday. 
I took the files from gputils-0.10.6.tar.gz from SourceForge.

This error is fixed including gpwritehex, as showed in my first mail.

I think any user trying to use libgputils will have the same problem....

Regards,

Carlos


-----Mensaje original-----
De: Craig Franklin <craigfranklin@attbi.com>
Para: Carlos Nieves Onega <cnieves@iespana.es>
Fecha: 29/01/03
Asunto: Re: Missing #include in gputils (gpreadhex.h)

It's not really an error.  I intended users to #include "libgputils.h",
if they wanted to use the library.  If you do this, checkout the latest
stuff in cvs.

A warning to those that choose to use the library: I frequently make
changes to the content and interface of the library to better serve
gputils.  If you use the library, don't be surprised if things change in
the future.

Carlos Nieves Onega wrote:
> 
> Hi,
> I just wanted to read hex files in other program, so I pick up
> gpreadhex*, gpmemory*, and stdhdr.h from gputils (directory
libgputils)
> to do it.
> I got a compilation error in gpreadhex.h, complaining about "enum
> formats" use in struct hex data (it was not defined). So I just added
a
> #include "gpwritehex.h" in gpreadhex.h, and pick up gpwritehex*, as
> follows:
> 
> --- ../../temp/gputils-0.10.6/libgputils/gpreadhex.h    2002-01-13
> 18:24:45.000000000 +0100
> +++ gpreadhex.h 2003-01-28 22:15:39.000000000 +0100
> @@ -21,6 +21,8 @@
>  #ifndef   GPREADHEX H  
>  #define   GPREADHEX H  
> 
> +#include "gpwritehex.h"
> +
>  struct hex data {
>    enum formats hex format;
>    int          size;
> ---
> 
> This solved the error. Maybe this will be useful to anyone...
> 
> Regards,
> 
> Carlos
> 
> --
> Carlos Nieves Onega <cnieves@iespana.es>
> 
> ---Publicidad--------------------------------------------------------
> Juega con Ventura24.es, lotería inteligente y multiplica tus
> posibilidades!! http://www.iespana.es/ reloc/email.ventura
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: gnupic-unsubscribe@linuxhacker.org
> For additional commands, e-mail: gnupic-help@linuxhacker.org

---------------------------------------------------------------------
To unsubscribe, e-mail: gnupic-unsubscribe@linuxhacker.org
For additional commands, e-mail: gnupic-help@linuxhacker.org


---Publicidad--------------------------------------------------------
Únete a los miles de sin pareja en Meetic... ¡te vas a enamorar!
http://www.iespana.es/ reloc/email.meetic

---Publicidad--------------------------------------------------------
Únete a los miles de sin pareja en Meetic... ¡te vas a enamorar!
http://www.iespana.es/ reloc/email.meetic



gnupic@linuxhacker.org