Re: trouble using glob and wordexp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Here's the code

#include <glob.h>
#include <wordexp.h>
#include "my-header.h"

//my-header.h brings in just a few headers like stdio.h and defines some
strucs I will be using.

/*This should eventually be called 
sruct metadata filefinder(struct swches s, unsigned short int fileno, stop)
GLOB_NOMAGIC | GLOB_NOSORT | GLOB_NOESCAPE*/



struct metadata
{
    unsigned short int stop;
    unsigned char *file;
    unsigned short int size;
    unsigned char *name;
    unsigned char *permissions;
    //Format mmddyyyy
    unsigned short int date;
    //If applicable
    unsigned char *directory;
    unsigned short int itemsindir;
};


int main(void)
{
    char a[6] = "hello";
    char *char1 = a;
    struct glob_t globulation;
    //struct wordexp_t wordomatic;
    /*int errfunc(const char *filename, int errorcode)
    {
       return('\0');
    }
    
    int check = glob(char1, GLOB_NOMAGIC | GLOB_NOSORT | GLOB_NOESCAPE,\
    &errfunc, globulation);*/
    
    //int check = wordexp(char1, wordomatic, WRDE_UNDEF);
    
    if (check != 0)
    {
       return(1);
    }
    
    
    return(0);
}



--
View this message in context: http://gcc.1065356.n5.nabble.com/trouble-using-glob-and-wordexp-tp945091p945122.html
Sent from the gcc - Help mailing list archive at Nabble.com.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux