projects
/
gapil.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rimessi insieme i makefile e le pagine web
[gapil.git]
/
sources
/
TestRen.c
diff --git
a/sources/TestRen.c
b/sources/TestRen.c
index 9e736defd574ab9a0c6551569b2c1e413840f010..9026cff8ba547308fd863de8a0f37428967b1b62 100644
(file)
--- a/
sources/TestRen.c
+++ b/
sources/TestRen.c
@@
-26,7
+26,7
@@
*
* Usage: testrem -h give all info's
*
*
* Usage: testrem -h give all info's
*
- * $Id: TestRen.c,v 1.
1 2002/01/03 23:44
:14 piccardi Exp $
+ * $Id: TestRen.c,v 1.
4 2003/05/02 09:55
:14 piccardi Exp $
*
****************************************************************/
/*
*
****************************************************************/
/*
@@
-47,10
+47,13
@@
int main(int argc, char *argv[])
* Variables definition
*/
int i;
* Variables definition
*/
int i;
+ char *buf,*copy;
/*
* Input section: decode command line parameters
* Use getopt function
*/
/*
* Input section: decode command line parameters
* Use getopt function
*/
+ buf = malloc(100);
+
opterr = 0; /* don't want writing to stderr */
while ( (i = getopt(argc, argv, "h")) != -1) {
switch (i) {
opterr = 0; /* don't want writing to stderr */
while ( (i = getopt(argc, argv, "h")) != -1) {
switch (i) {
@@
-82,6
+85,7
@@
int main(int argc, char *argv[])
usage();
}
if ( rename(argv[optind], argv[optind+1]) ) {
usage();
}
if ( rename(argv[optind], argv[optind+1]) ) {
+ copy = strerror_r(errno, NULL, 0);
perror("cannot rename");
exit(1);
}
perror("cannot rename");
exit(1);
}