Warnugn and linefeed patch
This commit is contained in:
24
kern.h
Executable file → Normal file
24
kern.h
Executable file → Normal file
@@ -1,12 +1,12 @@
|
||||
/* kern.h Assembler Routinen 20-Nov-93 */
|
||||
extern int IPXinit(void);
|
||||
extern int IPXopen_socket(UI sock, int live);
|
||||
extern void IPXclose_socket(UI sock);
|
||||
extern int IPXlisten(ECB *ecb);
|
||||
extern void asm_esr_routine(void);
|
||||
extern void esr_routine(ECB *ecb);
|
||||
extern void xmemmove(void *ziel, void *quelle, UI anz);
|
||||
extern int Net_Call(UI func, void *req, void *repl);
|
||||
|
||||
|
||||
|
||||
/* kern.h Assembler Routinen 20-Nov-93 */
|
||||
extern int IPXinit(void);
|
||||
extern int IPXopen_socket(UI sock, int live);
|
||||
extern void IPXclose_socket(UI sock);
|
||||
extern int IPXlisten(ECB *ecb);
|
||||
extern void asm_esr_routine(void);
|
||||
extern void esr_routine(ECB *ecb);
|
||||
extern void xmemmove(void *ziel, void *quelle, UI anz);
|
||||
extern int Net_Call(UI func, void *req, void *repl);
|
||||
|
||||
|
||||
|
||||
|
||||
8
login.c
Executable file → Normal file
8
login.c
Executable file → Normal file
@@ -391,9 +391,17 @@ int func_exec(int argc, char *argv[], int mode)
|
||||
xfree(buff);
|
||||
if (nargv != NULL) {
|
||||
if (!mode)
|
||||
#ifdef __WATCOMC__
|
||||
spawnvp(P_WAIT, buf, (const char * const *)nargv);
|
||||
#else
|
||||
spawnvp(P_WAIT, buf, nargv);
|
||||
#endif
|
||||
else
|
||||
#ifdef __WATCOMC__
|
||||
execvp(buf, (const char * const *)nargv);
|
||||
#else
|
||||
execvp(buf, nargv);
|
||||
#endif
|
||||
}
|
||||
xfree(buf);
|
||||
}
|
||||
|
||||
0
makefile.bcc
Executable file → Normal file
0
makefile.bcc
Executable file → Normal file
18
net.h
Executable file → Normal file
18
net.h
Executable file → Normal file
@@ -15,6 +15,9 @@
|
||||
#include <dos.h>
|
||||
#include <process.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef __WATCOMC__
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
typedef unsigned int UI;
|
||||
typedef unsigned int uint;
|
||||
@@ -135,6 +138,12 @@ extern void leb(uint8 *s);
|
||||
extern char *getglobenv(char *option);
|
||||
extern int putglobenv(char *option);
|
||||
|
||||
#ifdef __WATCOMC__
|
||||
/* Borland C compatibility wrappers implemented in tools.c. */
|
||||
extern int getcurdir(int drive, char *directory);
|
||||
extern void setdisk(int drive);
|
||||
#endif
|
||||
|
||||
/* NETCALLS */
|
||||
#define DRIVE_ADD 1
|
||||
#define DRIVE_INSERT 2
|
||||
@@ -159,6 +168,12 @@ extern int neterrno;
|
||||
alloc_dir_handle(0x13, (dhandle), (path), (drive), (rights))
|
||||
|
||||
extern int ipx_init(void);
|
||||
extern int logout(void);
|
||||
extern int redir_device_drive(int devicetyp, uint8 *devname, uint8 *remotename);
|
||||
extern int list_redir(int index, int *devicetyp, uint8 *devname, uint8 *remotename);
|
||||
extern int get_drive_info(uint8 drivenumber, uint8 *connid,
|
||||
uint8 *dhandle, uint8 *statusflags);
|
||||
extern int get_fs_name(int connid, char *name);
|
||||
|
||||
extern int alloc_dir_handle(int func, int dhandle, char *path,
|
||||
int driveletter, uint8 *effrights);
|
||||
@@ -179,11 +194,13 @@ extern int ncp_16_02(int dirhandle,
|
||||
uint32 *creattime,
|
||||
uint32 *owner_id);
|
||||
|
||||
extern int ncp_14_46(uint32 *obj_id);
|
||||
extern int ncp_17_02(int module, int debuglevel);
|
||||
extern int ncp_17_14(uint8 *objname, uint16 objtyp, uint8 *password);
|
||||
extern int ncp_17_17(uint8 *key);
|
||||
extern int ncp_17_18(uint8 *cryptkey, uint8 *objname, uint16 objtyp);
|
||||
extern uint32 ncp_17_35(uint8 *objname, uint16 objtyp);
|
||||
extern int ncp_17_36(uint32 obj_id, uint8 *objname, uint16 *objtyp);
|
||||
extern int ncp_17_40(uint8 *objname, uint16 objtyp, uint8 *password,
|
||||
uint8 *newpassword);
|
||||
|
||||
@@ -193,6 +210,7 @@ extern int ncp_17_4b(uint8 *cryptkey, uint8 *objname, uint16 objtyp,
|
||||
/* map.c */
|
||||
extern int func_map (int argc, char *argv[], int mode);
|
||||
extern int func_path (int argc, char *argv[], int mode);
|
||||
extern void remove_nwpathes(void);
|
||||
|
||||
/* login.c */
|
||||
extern int func_login (int argc, char *argv[], int mode);
|
||||
|
||||
190
teste.c
Executable file → Normal file
190
teste.c
Executable file → Normal file
@@ -1,95 +1,95 @@
|
||||
int main()
|
||||
{
|
||||
char *fn="F.$LN";
|
||||
char *string="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz";
|
||||
int result;
|
||||
struct stat stbuff;
|
||||
long offset;
|
||||
char buff[1024];
|
||||
char readbuff[500];
|
||||
int j;
|
||||
int fd=creatnew(fn, S_IREAD |S_IWRITE);
|
||||
if (fd > -1) {
|
||||
printf("Konnte Date erzeugen\n");
|
||||
close(fd);
|
||||
} else {
|
||||
printf("Konnte Datei nicht erzeugen\n");
|
||||
}
|
||||
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC|O_DENYNONE, 0666);
|
||||
memset(buff, 0, sizeof(buff) );
|
||||
strcpy(buff, string);
|
||||
write(fd, buff, strlen(buff));
|
||||
close(fd);
|
||||
_chmod(fn, 1, _chmod(fn, 0) | 0x80 );
|
||||
stat(fn, &stbuff);
|
||||
printf("Filesize <20>ber stat =%ld\n", stbuff.st_size);
|
||||
fd = open(fn, O_RDWR | O_BINARY |O_DENYNONE);
|
||||
|
||||
offset = lseek(fd, 0L, SEEK_END);
|
||||
printf("Filesize <20>ber lseek =%ld\n", offset);
|
||||
write(fd, buff, strlen(buff));
|
||||
|
||||
lseek(fd, 0L, SEEK_SET);
|
||||
for (j=0; j < strlen(buff)*2; j++){
|
||||
read(fd, readbuff, 1);
|
||||
printf("BUFF = %c\n", readbuff[0]);
|
||||
}
|
||||
lseek(fd, 1L, SEEK_SET);
|
||||
for (j = 0; j < 20; j++){
|
||||
write(fd, buff+j, 1);
|
||||
}
|
||||
|
||||
for (j=0; j <60; j++){
|
||||
lseek(fd, (long) j, SEEK_SET);
|
||||
read(fd, readbuff, 2);
|
||||
printf("BUFF = %c, %c \n", readbuff[0], readbuff[1]);
|
||||
}
|
||||
|
||||
lseek(fd, 10L, SEEK_SET);
|
||||
read(fd, buff, 1);
|
||||
printf("BUFF[10] = %c\n", buff[0]);
|
||||
result=lock(fd, 100L, 1L);
|
||||
printf("lock result = %d\n", result);
|
||||
result=unlock(fd, 100L, 1L);
|
||||
printf("unlock result = %d\n", result);
|
||||
close(fd);
|
||||
|
||||
fd = open(fn, O_BINARY|O_RDWR|O_CREAT|O_TRUNC|O_DENYNONE, 0666);
|
||||
if (fd > -1) {
|
||||
int bufflen;
|
||||
strcpy(buff, "d:..\\marlib\\c0l.obj+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "/c/x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\EMU.LIB+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\mathl.lib+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\cl.lib");
|
||||
bufflen=strlen(buff);
|
||||
printf("bufflen = %d, buff=%s\n", bufflen, buff);
|
||||
write(fd, buff, bufflen);
|
||||
close(fd);
|
||||
fd = open(fn, O_TEXT|O_RDONLY);
|
||||
if (fd > -1) {
|
||||
char *p=readbuff;
|
||||
int anz = 0;
|
||||
memset(readbuff, 0, sizeof(readbuff) );
|
||||
while (read(fd, p, 1) == 1){
|
||||
anz++;
|
||||
p++;
|
||||
}
|
||||
printf("read = %d, buff=%s\n", anz, readbuff);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
/*
|
||||
result = detach(1);
|
||||
printf("Detach result=0x%x", result);
|
||||
*/
|
||||
return(0);
|
||||
}
|
||||
int main()
|
||||
{
|
||||
char *fn="F.$LN";
|
||||
char *string="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890abcdefghijklmnopqrstuvwxyz";
|
||||
int result;
|
||||
struct stat stbuff;
|
||||
long offset;
|
||||
char buff[1024];
|
||||
char readbuff[500];
|
||||
int j;
|
||||
int fd=creatnew(fn, S_IREAD |S_IWRITE);
|
||||
if (fd > -1) {
|
||||
printf("Konnte Date erzeugen\n");
|
||||
close(fd);
|
||||
} else {
|
||||
printf("Konnte Datei nicht erzeugen\n");
|
||||
}
|
||||
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC|O_DENYNONE, 0666);
|
||||
memset(buff, 0, sizeof(buff) );
|
||||
strcpy(buff, string);
|
||||
write(fd, buff, strlen(buff));
|
||||
close(fd);
|
||||
_chmod(fn, 1, _chmod(fn, 0) | 0x80 );
|
||||
stat(fn, &stbuff);
|
||||
printf("Filesize <20>ber stat =%ld\n", stbuff.st_size);
|
||||
fd = open(fn, O_RDWR | O_BINARY |O_DENYNONE);
|
||||
|
||||
offset = lseek(fd, 0L, SEEK_END);
|
||||
printf("Filesize <20>ber lseek =%ld\n", offset);
|
||||
write(fd, buff, strlen(buff));
|
||||
|
||||
lseek(fd, 0L, SEEK_SET);
|
||||
for (j=0; j < strlen(buff)*2; j++){
|
||||
read(fd, readbuff, 1);
|
||||
printf("BUFF = %c\n", readbuff[0]);
|
||||
}
|
||||
lseek(fd, 1L, SEEK_SET);
|
||||
for (j = 0; j < 20; j++){
|
||||
write(fd, buff+j, 1);
|
||||
}
|
||||
|
||||
for (j=0; j <60; j++){
|
||||
lseek(fd, (long) j, SEEK_SET);
|
||||
read(fd, readbuff, 2);
|
||||
printf("BUFF = %c, %c \n", readbuff[0], readbuff[1]);
|
||||
}
|
||||
|
||||
lseek(fd, 10L, SEEK_SET);
|
||||
read(fd, buff, 1);
|
||||
printf("BUFF[10] = %c\n", buff[0]);
|
||||
result=lock(fd, 100L, 1L);
|
||||
printf("lock result = %d\n", result);
|
||||
result=unlock(fd, 100L, 1L);
|
||||
printf("unlock result = %d\n", result);
|
||||
close(fd);
|
||||
|
||||
fd = open(fn, O_BINARY|O_RDWR|O_CREAT|O_TRUNC|O_DENYNONE, 0666);
|
||||
if (fd > -1) {
|
||||
int bufflen;
|
||||
strcpy(buff, "d:..\\marlib\\c0l.obj+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "/c/x");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\EMU.LIB+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\mathl.lib+");
|
||||
strcat(buff, "\r\n");
|
||||
strcat(buff, "d:..\\marlib\\cl.lib");
|
||||
bufflen=strlen(buff);
|
||||
printf("bufflen = %d, buff=%s\n", bufflen, buff);
|
||||
write(fd, buff, bufflen);
|
||||
close(fd);
|
||||
fd = open(fn, O_TEXT|O_RDONLY);
|
||||
if (fd > -1) {
|
||||
char *p=readbuff;
|
||||
int anz = 0;
|
||||
memset(readbuff, 0, sizeof(readbuff) );
|
||||
while (read(fd, p, 1) == 1){
|
||||
anz++;
|
||||
p++;
|
||||
}
|
||||
printf("read = %d, buff=%s\n", anz, readbuff);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
/*
|
||||
result = detach(1);
|
||||
printf("Detach result=0x%x", result);
|
||||
*/
|
||||
return(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user