ts-7000
[Top] [All Lists]

[ts-7000] Re: free space on CF

To:
Subject: [ts-7000] Re: free space on CF
From: "josue.cubero" <>
Date: Sat, 15 Jan 2011 18:34:02 -0000
How interesting is the function popen, I think I'll do :D

#include <stdio.h>

main()
{
        /* Fichero con el que abriremos date */
        FILE *fichero=NULL;

        /* Variable auxiliar para leer el fichero */
        char aux[1000];

   /* Se abre el fichero datey se comprueba
    * que se ha podido abrir correctamente */
        fichero = popen ("date", "r");
        if (fichero == NULL)
        {
                perror ("No se puede abrir date");
                exit (-1);
        }

        /* Se lee la primera linea y se hace un bucle, hasta fin de fichero,
         * para ir sacando por pantalla los resultados.
         */
        fgets (aux, 1000, fichero);
        while (!feof (fichero))
        {
                printf ("%s", aux);
                fgets (aux, 1000, fichero);
        }

        /* Se cierra el fichero */
        pclose (fichero);
}

I get a file system information, nothing else I have to save the data that 
returns me a file and read what I need, thanks




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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU