Author: fireball
Date: Wed Nov 11 19:19:42 2009
New Revision: 44107
URL:
http://svn.reactos.org/svn/reactos?rev=44107&view=rev
Log:
[rosapps]
- Avoid old crt names usage, by Caemyr/kjk_hyperion.
Modified:
trunk/rosapps/applications/cmdutils/touch/touch.c
trunk/rosapps/applications/net/ncftp/libncftp/open.c
trunk/rosapps/applications/net/ncftp/ncftp/bookmark.c
trunk/rosapps/applications/net/ncftp/ncftp/cmds.c
trunk/rosapps/applications/net/ncftp/ncftp/getline.c
trunk/rosapps/applications/net/ncftp/ncftp/preffw.c
trunk/rosapps/applications/net/ncftp/ncftp/readln.c
trunk/rosapps/applications/net/ncftp/ncftp/spool.c
trunk/rosapps/applications/net/ncftp/ncftp/trace.c
trunk/rosapps/applications/sysutils/utils/binpatch/patch.c
Modified: trunk/rosapps/applications/cmdutils/touch/touch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/cmdutils/touc…
==============================================================================
--- trunk/rosapps/applications/cmdutils/touch/touch.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/cmdutils/touch/touch.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -146,9 +146,9 @@
if (stat(*argv, &sb)) {
if (!cflag) {
/* Create the file. */
- fd = open(*argv,
+ fd = _open(*argv,
O_WRONLY | O_CREAT, DEFFILEMODE);
- if (fd == -1 || fstat(fd, &sb) || close(fd)) {
+ if (fd == -1 || fstat(fd, &sb) || _close(fd)) {
rval = 1;
warn("%s", *argv);
continue;
@@ -300,37 +300,37 @@
}
needed_chmod = rval = 0;
- if ((fd = open(fname, O_RDWR, 0)) == -1) {
- if (!force || chmod(fname, DEFFILEMODE))
- goto err;
- if ((fd = open(fname, O_RDWR, 0)) == -1)
+ if ((fd = _open(fname, O_RDWR, 0)) == -1) {
+ if (!force || _chmod(fname, DEFFILEMODE))
+ goto err;
+ if ((fd = _open(fname, O_RDWR, 0)) == -1)
goto err;
needed_chmod = 1;
}
if (sbp->st_size != 0) {
- if (read(fd, &byte, sizeof(byte)) != sizeof(byte))
- goto err;
- if (lseek(fd, (off_t)0, SEEK_SET) == -1)
- goto err;
- if (write(fd, &byte, sizeof(byte)) != sizeof(byte))
+ if (_read(fd, &byte, sizeof(byte)) != sizeof(byte))
+ goto err;
+ if (_lseek(fd, (off_t)0, SEEK_SET) == -1)
+ goto err;
+ if (_write(fd, &byte, sizeof(byte)) != sizeof(byte))
goto err;
} else {
- if (write(fd, &byte, sizeof(byte)) != sizeof(byte)) {
+ if (_write(fd, &byte, sizeof(byte)) != sizeof(byte)) {
err: rval = 1;
warn("%s", fname);
/* } else if (ftruncate(fd, (off_t)0)) {*/
- } else if (chsize(fd, (off_t)0)) {
+ } else if (_chsize(fd, (off_t)0)) {
rval = 1;
warn("%s: file modified", fname);
}
}
- if (close(fd) && rval != 1) {
+ if (_close(fd) && rval != 1) {
rval = 1;
warn("%s", fname);
}
- if (needed_chmod && chmod(fname, sbp->st_mode) && rval != 1) {
+ if (needed_chmod && _chmod(fname, sbp->st_mode) && rval != 1) {
rval = 1;
warn("%s: permissions modified", fname);
}
Modified: trunk/rosapps/applications/net/ncftp/libncftp/open.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/lib…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/libncftp/open.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/libncftp/open.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -1075,14 +1075,14 @@
/* Reattach the FILE pointers for use with the Std I/O library
* routines.
*/
- if ((cip->cin = fdopen(cip->ctrlSocketR, "r")) == NULL) {
+ if ((cip->cin = _fdopen(cip->ctrlSocketR, "r")) == NULL) {
cip->errNo = kErrFdopenR;
cip->ctrlSocketR = kClosedFileDescriptor;
cip->ctrlSocketW = kClosedFileDescriptor;
return (kErrFdopenR);
}
- if ((cip->cout = fdopen(cip->ctrlSocketW, "w")) == NULL) {
+ if ((cip->cout = _fdopen(cip->ctrlSocketW, "w")) == NULL) {
CloseFile(&cip->cin);
cip->errNo = kErrFdopenW;
cip->ctrlSocketR = kClosedFileDescriptor;
Modified: trunk/rosapps/applications/net/ncftp/ncftp/bookmark.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/bookmark.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/bookmark.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -297,7 +297,7 @@
return NULL; /* Okay to not have one yet. */
}
- (void) chmod(pathName, 00600);
+ (void) _chmod(pathName, 00600);
if (FGets(line, sizeof(line), fp) == NULL) {
(void) fprintf(stderr, "%s: invalid format.\n", pathName);
(void) fclose(fp);
@@ -683,7 +683,7 @@
perror(pathName);
return (NULL);
}
- (void) chmod(pathName, 00600);
+ (void) _chmod(pathName, 00600);
if (nb > 0) {
if (fprintf(outfp, "NcFTP bookmark-file version: %d\nNumber of bookmarks:
%d\n", kBookmarkVersion, nb) < 0) {
(void) fprintf(stderr, "Could not save bookmark.\n");
Modified: trunk/rosapps/applications/net/ncftp/ncftp/cmds.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/cmds.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/cmds.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -2540,7 +2540,7 @@
#endif
for (i=1; i<argc; i++) {
- result = FTPGetOneFile2(&gConn, argv[i], NULL, kTypeAscii, fileno(stream),
kResumeNo, kAppendNo);
+ result = FTPGetOneFile2(&gConn, argv[i], NULL, kTypeAscii, _fileno(stream),
kResumeNo, kAppendNo);
if (result < 0) {
if (errno != EPIPE) {
ClosePager(stream);
Modified: trunk/rosapps/applications/net/ncftp/ncftp/getline.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/getline.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/getline.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -506,7 +506,7 @@
}
hist_init();
}
- if (isatty(0) == 0 || isatty(1) == 0)
+ if (_isatty(0) == 0 || _isatty(1) == 0)
gl_error("\n*** Error: getline(): not interactive, use stdio.\n");
gl_char_init();
gl_init_done = 1;
@@ -2398,7 +2398,7 @@
if ((name[0] == '.') && ((name[1] == '\0') || ((name[1] ==
'.') && (name[2] == '\0'))))
goto next; /* Skip . and .. */
- if ((filepfxlen == 0) || (strnicmp(name, filepfx, filepfxlen) == 0)) {
+ if ((filepfxlen == 0) || (_strnicmp(name, filepfx, filepfxlen) == 0)) {
/* match */
len = strlen(name);
cp = (char *) malloc(filepfxoffset + len + 4 /* spare */ + 1 /* NUL */);
Modified: trunk/rosapps/applications/net/ncftp/ncftp/preffw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/preffw.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/preffw.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -321,7 +321,7 @@
if (fp != NULL) {
WriteDefaultFirewallPrefs(fp);
(void) fclose(fp);
- (void) chmod(pathName, 00600);
+ (void) _chmod(pathName, 00600);
gNumProgramRuns = 1;
}
}
Modified: trunk/rosapps/applications/net/ncftp/ncftp/readln.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/readln.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/readln.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -649,7 +649,7 @@
gl_strlen = Vt100VisibleStrlen;
gl_histsavefile(pathName);
- (void) chmod(pathName, 00600);
+ (void) _chmod(pathName, 00600);
} /* SaveHistory */
Modified: trunk/rosapps/applications/net/ncftp/ncftp/spool.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/spool.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/spool.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -113,7 +113,7 @@
gHaveSpool = 0;
if (gOurInstallationPath[0] != '\0') {
OurInstallationPath(ncftpbatch, sizeof(ncftpbatch), "ncftpbatch.exe");
- gHaveSpool = (access(ncftpbatch, F_OK) == 0) ? 1 : 0;
+ gHaveSpool = (_access(ncftpbatch, F_OK) == 0) ? 1 : 0;
}
}
#elif defined(BINDIR)
Modified: trunk/rosapps/applications/net/ncftp/ncftp/trace.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/net/ncftp/ncf…
==============================================================================
--- trunk/rosapps/applications/net/ncftp/ncftp/trace.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/net/ncftp/ncftp/trace.c [iso-8859-1] Wed Nov 11 19:19:42
2009
@@ -125,7 +125,7 @@
fp = fopen(pathName, FOPEN_WRITE_TEXT);
if (fp != NULL) {
- (void) chmod(pathName, 00600);
+ (void) _chmod(pathName, 00600);
#ifdef HAVE_SETVBUF
(void) setvbuf(fp, gTraceLBuf, _IOLBF, sizeof(gTraceLBuf));
#endif /* HAVE_SETVBUF */
Modified: trunk/rosapps/applications/sysutils/utils/binpatch/patch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/util…
==============================================================================
--- trunk/rosapps/applications/sysutils/utils/binpatch/patch.c [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/utils/binpatch/patch.c [iso-8859-1] Wed Nov 11
19:19:42 2009
@@ -69,7 +69,7 @@
}
/* Get file size */
- if (fstat(fileno(f), &sb) < 0)
+ if (fstat(_fileno(f), &sb) < 0)
{
fclose(f);
printf("Couldn't get size of file %s!\n", fileName);
@@ -506,7 +506,7 @@
_snprintf(buffer, MAX_PATH, "%s.bak", fileName);
buffer[MAX_PATH-1] = '\0';
makeBackup = 1;
- if (access(buffer, 0) >= 0) /* file exists */
+ if (_access(buffer, 0) >= 0) /* file exists */
{
printf("File %s already exists, overwrite? (Y)es, (N)o,
(A)bort", buffer);
do