dotgnu-pnet-commits
[Top][All Lists]
Advanced

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

[Dotgnu-pnet-commits] CVS: pnetC/samples dirent.c, NONE, 1.1 Makefile.am


From: Richard Baumann <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetC/samples dirent.c, NONE, 1.1 Makefile.am, 1.2, 1.3
Date: Fri, 22 Aug 2003 04:15:45 -0400

Update of /cvsroot/dotgnu-pnet/pnetC/samples
In directory subversions:/tmp/cvs-serv7641/samples

Modified Files:
        Makefile.am 
Added Files:
        dirent.c 
Log Message:
Add dirent implementation and example program.


--- NEW FILE ---
#include <errno.h>
#include <stddef.h>
#include <dirent.h>

int main(int argc, char *argv[])
{
        DIR *dirp;
        struct dirent *dp;

        errno = 0;
        if(!(dirp = opendir(".")))
        {
                printf("opendir(\".\") failed ... errno: %d\n", errno);
                return errno;
        }

        errno = 0;
        while((dp = readdir(dirp)))
        {
                printf("entry: %s", dp->d_name);
                if (errno)
                {
                        printf(" ... errno: %d", errno);
                        errno = 0;
                }
                printf("\n");
        }

        if (errno)
        {
                printf("errno: %d\n", errno);
        }

        closedir(dirp);

        return errno;
}

Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetC/samples/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Makefile.am 24 Dec 2002 01:21:52 -0000      1.2
--- Makefile.am 22 Aug 2003 08:15:43 -0000      1.3
***************
*** 2,6 ****
  AUTOMAKE_OPTIONS = no-dependencies
  
! noinst_PROGRAMS = hello.exe hello2.exe stack.exe pwd.exe
  
  hello_exe_SOURCES = hello.c
--- 2,9 ----
  AUTOMAKE_OPTIONS = no-dependencies
  
! noinst_PROGRAMS = dirent.exe hello.exe hello2.exe stack.exe pwd.exe
! 
! dirent_exe_SOURCES = dirent.c
! dirent_exe_LDADD = -L../libc -lOpenSystem.C -llibc$(LIBRARY_SUFFIX)
  
  hello_exe_SOURCES = hello.c





reply via email to

[Prev in Thread] Current Thread [Next in Thread]