aboutsummaryrefslogtreecommitdiff
path: root/tests/pushck.c
blob: f94cbf700ec43a106280cecc670f5c380d07d149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <config.h>
#include <wydawca.h>

static void
printcwd (int c)
{
  char *dir = getcwd_alloc ();
  printf ("%c%s\n", c, dir);
  free (dir);
}
  
int
main (int argc, char **argv)
{
  while (--argc)
    {
      char *dir = *++argv;
      if (push_dir (dir))
	{
	  perror (dir);
	  abort ();
	}
      printcwd ('+');
    }

  do
    {
      printcwd ('-');
    }
  while (pop_dir() == 0);
  exit(0);
}    
	  
  /*===============*/

Return to:

Send suggestions and report system problems to the System administrator.