[comp.os.vms] Shell functions in VAX C

molik@acsu.buffalo.edu (gregory b molik) (06/08/90)

Could someone please describe the syntax for the SHELL$TO_VMS function?


Greg
molik@acsu.buffalo.edu
ACSCGBM@UBVMS

terence@hkov04.dec.com (Terence Lee @HKO, Digital Equipment Corporation) (06/08/90)

In article <27786@eerie.acsu.Buffalo.EDU>, molik@acsu.buffalo.edu (gregory b molik) writes...
#
#
#Could someone please describe the syntax for the SHELL$TO_VMS function?
#
#
#Greg
#molik@acsu.buffalo.edu
#ACSCGBM@UBVMS

/*
 *  shell$to_vms(shell_file_spec,user_written_action_routine,wildcard_flag)
 *  char    *shell_file_spec;
 *  int	    user_written_action_routine();
 *  int	    wildcard_flag;
 *
 *  return number_of_files_translated
 *
 *  int user_written_action_routine(vms_file_spec)
 *  char    *vms_file_spec;
 *
 *  return 1 for wildcard search to continue
 */

#include <stdio.h>

#define shell_1		"/dua1/deilhk/mis/terence/login.com"
#define shell_2		"/dua1/deilhk/mis/terence/*.*"

char	result[255];
char	*shell_to_vms_action();

main()
{
	printf("SHELL$TO_VMS %s\n",shell_1);
	shell$to_vms(shell_1,shell_to_vms_action,0);
	printf("SHELL$TO_VMS %s\n",shell_2);
	shell$to_vms(shell_2,shell_to_vms_action,1);
}

char *shell_to_vms_action(str)
char	*str;
{
	strcpy(result,str);
	printf("\t%s\n",result);
	return(1);
}

================================================================================
Terence Lee     terence%hkov04.dec@decwrl.dec.com
                root%hkvs04.dec@decwrl.dec.com
From Middlesex, UWO
================================================================================