🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.dec
Article #1609

Re: Shell functions in VAX C

#1609
From: Terence Lee Digital Equipment Co...
Date: Fri, 08 Jun 1990 13:59
54 lines
1887 bytes
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
================================================================================
Technical Details
Message-ID: <1655@mountn.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!decuac!shlump.nac.dec.com!mountn.dec.com!hkov04.dec.com!terence

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!purdue!haven!decuac!shlump.nac.dec.com!mountn.dec.com!hkov04.dec.com!terence
From: terence@hkov04.dec.com (Terence Lee @HKO, Digital Equipment Corporation)
Newsgroups: comp.sys.dec,comp.os.vms
Subject: Re: Shell functions in VAX C
Message-ID: <1655@mountn.dec.com>
Date: 8 Jun 90 13:59:16 GMT
Sender: news@mountn.dec.com
Followup-To: comp.sys.dec
Distribution: na
Organization: Digital Equipment Corporation, Hong Kong
Lines: 54