mirror of
https://github.com/lcn2/calc.git
synced 2025-08-19 01:13:27 +03:00
Remove old MSDOS code in favor of _WIN32 & _WIN64
This commit is contained in:
11
input.c
11
input.c
@@ -44,10 +44,9 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__MSDOS__)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#define _fullpath(f,n,s) (_fixpath(n,f),f)
|
#define _fullpath(f,n,s) (_fixpath(n,f),f)
|
||||||
#define MSDOS_MAX_PATH PATH_MAX
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "calc.h"
|
#include "calc.h"
|
||||||
@@ -996,9 +995,9 @@ isinoderead(struct stat *sbuf)
|
|||||||
/* scan the entire readset */
|
/* scan the entire readset */
|
||||||
for (i=0; i < maxreadset; ++i) {
|
for (i=0; i < maxreadset; ++i) {
|
||||||
#if defined(_WIN32) || defined(_WIN64)
|
#if defined(_WIN32) || defined(_WIN64)
|
||||||
char tmp[MSDOS_MAX_PATH+1];
|
char tmp[MAX_PATH+1];
|
||||||
tmp[MSDOS_MAX_PATH] = '\0';
|
tmp[MAX_PATH] = '\0';
|
||||||
if (_fullpath(tmp, cip->i_name, MSDOS_MAX_PATH) &&
|
if (_fullpath(tmp, cip->i_name, MAX_PATH) &&
|
||||||
readset[i].active &&
|
readset[i].active &&
|
||||||
strcasecmp(readset[i].path, tmp) == 0) {
|
strcasecmp(readset[i].path, tmp) == 0) {
|
||||||
/* found a match */
|
/* found a match */
|
||||||
@@ -1129,7 +1128,7 @@ addreadset(char *name, char *path, struct stat *sbuf)
|
|||||||
* this new longer path name.
|
* this new longer path name.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
readset[ret].path = _fullpath(NULL, path, MSDOS_MAX_PATH);
|
readset[ret].path = _fullpath(NULL, path, MAX_PATH);
|
||||||
if (readset[ret].path == NULL) {
|
if (readset[ret].path == NULL) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user