home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************/
- /* Program : SocketFS */
- /* Purpose : A BSD sockets filesystem for RISCOS */
- /* File : TstNmProc.c */
- /* Description : Tests the filename processor. */
- /* Author : R G Gammans */
- /* Date Created : */
- /* Last Edited : */
- /* */
- /* Copyright Date: */
- /* */
- /***************************************************************************/
- /*
- * SocketFS - BSD sockets filing system for RISC-OS.
- * Copyright (C) 1997 Roger G Gammans
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Author: R Gammans <rgammans@compsurg,demon.co.uk>
- * Snailmail : 20 Trenches Rd, Crowborough, E Sussex, TN6 1ES UK.
- */
-
- #include <stdio.h>
- #include <errno.h>
-
- extern int makeSocket(char*, char*);
- extern void inithandlerlist();
-
- extern char* errstr;
-
- int main (int argc,char* argv[])
- {
- int s;
-
- if (argc>1) {
- argc--;
- argv++;
- inithandlerlist();
- while (argc>0) {
- errstr="";
- s=makeSocket(0,argv[0]);
- if (s!=-1) {
- printf("%s is sockect number - %d\n",argv[0],s);
- } else {
- printf("Err no %d\n errmsg %s",errno,errstr);
- }
- argc--;
- argv++;
- }
- } else {
- printf("TstNmPrc takes socketfs style filenames as parameters\n");
- }
- return 0;
-
- }
-
-
-