| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Filename Expansion |
G'Day John,
-=> Quoting John Gardeniers to Frank Adam <=-
It did get here after all, but took it's time.
JG> All constructive criticism, sugestions and comments are
JG> welcome. Insults are best kept to yourself.
Ok :)
JG> #define MAXPATH 160 /* Gives it plenty of room */
Dos allows 67 chars plus the filename so yes, you're a wasteful person,
but i'll keep it to myself :)
JG> if(argc>3)
JG> mode=atoi(argv[3]); /* 0 = Copy, 1 = Move, 2 = Rename */
Maybe an "if(mode 2) user_idiot();" after the
previous line
would speed up things on error here, there is no reason to go any further
into the program if it is TRUE.
Unless i missed it default to something somewhere else ?
This is only esthetics, but lately i've been putting most of my error messgs
in a separate function under a switch, and #define all possible errors.
Looks nice that way, and not any harder to follow, of course the defines are
meaningful.
On error i just call errs(erno) or warns(warno).
On fatals i even stick an exit(int) in there, makes returning various
errorlevels to batches an easy task.
Just thought i'll share that one :-)
JG> /* Convert source & destination to upper case */
JG> for(cnt=0; cnt * Origin: The Software Parlour (3:635/544)SEEN-BY: 50/99 78/0 620/243 623/630 632/349 635/503 544 727 711/401 409 410 SEEN-BY: 711/413 430 808 809 932 934 712/515 713/888 714/906 800/1 7877/2809 @PATH: 635/544 50/99 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.