From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14598 invoked by alias); 10 Jun 2013 18:02:16 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 14586 invoked by uid 89); 10 Jun 2013 18:02:16 -0000 X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_HOSTKARMA_YE,SPF_FAIL,TW_DY,URI_HEX autolearn=no version=3.3.1 Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 10 Jun 2013 18:02:15 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Um6Q1-0007tt-GV for gcc-help@gcc.gnu.org; Mon, 10 Jun 2013 11:02:13 -0700 Date: Mon, 10 Jun 2013 18:02:00 -0000 From: ballsystemlord To: gcc-help@gcc.gnu.org Message-ID: <1370887333505-945122.post@n5.nabble.com> In-Reply-To: <1370886415956-945114.post@n5.nabble.com> References: <1370879959438-945091.post@n5.nabble.com> <1370886415956-945114.post@n5.nabble.com> Subject: Re: trouble using glob and wordexp MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00056.txt.bz2 Here's the code #include #include #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.