FreeCalypso > hg > freecalypso-sw
diff rvinterf/etmsync/fswrite.c @ 291:69e8ae2b5ba2
fc-fsio: fwrite implementation started
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Sat, 01 Mar 2014 02:36:25 +0000 |
parents | 76228aecf0d9 |
children | 3aa03b9519c0 |
line wrap: on
line diff
--- a/rvinterf/etmsync/fswrite.c Fri Feb 28 23:41:53 2014 +0000 +++ b/rvinterf/etmsync/fswrite.c Sat Mar 01 02:36:25 2014 +0000 @@ -98,3 +98,34 @@ } return(0); } + +fwrite_hex_string(pathname, strarg) + char *pathname, *strarg; +{ + fprintf(stderr, "This function is not yet implemented\n"); + return(ERROR_BUG); +} + +fwrite_from_file(pathname, srcfile) + char *pathname, *srcfile; +{ + fprintf(stderr, "This function is not yet implemented\n"); + return(ERROR_BUG); +} + +cmd_fwrite(argc, argv) + char **argv; +{ + if (!strcmp(argv[2], "ascii")) + return do_short_fwrite(argv[1], argv[3], strlen(argv[3])); + else if (!strcmp(argv[2], "hex")) + return fwrite_hex_string(argv[1], argv[3]); + else if (!strcmp(argv[2], "file")) + return fwrite_from_file(argv[1], argv[3]); + else { + fprintf(stderr, +"error: middle argument to fwrite cmd must be \"ascii\", \"hex\" or \"file\"\n" + ); + return(ERROR_USAGE); + } +}