/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
/***********************************************************
* command name: dirs
* Note: (1) Print the directory  stack.
*       (2) dirs is C-shell compatible
*       (3) global variable g_dirstack is defined in 
*           $CHHOME/config/chrc
*
* History: created by Harry H. Cheng, 11/5/1996
**********************************************************/
#include<stdio.h>
int main(int argc, char *argv[]) {
  struct dirstack_t{ 
    string_t dir;  
    struct dirstack_t *next;
  } *e;
  int i;

  e = (struct dirstack_t *) g_dirstack;
  while(e!=NULL) {
    printf("%d\t%s\n", i++, e->dir);
    e = e->next;
  }
}
