Google
 

Trailing-Edge - PDP-10 Archives - SRI_NIC_PERM_FS_1_19910112 - c/lib/test/tchdir.c
There are 5 other files named tchdir.c in the archive. Click here to see a list.
/*
 *	test chdir()
 */

#include "stdio.h"
#include "errno.h"

main(argc, argv)
int argc;
char **argv;
{
    char *dir;
    int result;

    if (argc < 2) {
	printf("usage: %s directory\n", argv[0]);
	exit(0);
    }
    dir = argv[1];
    result = chdir(dir);
    printf("chdir(\"%s\") = %d\n", dir, result);
    if (!result)
	printf("succeeded, you should be connected to %s now.\n", dir);
    else
	perror("failed");
}