Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Innovation distinguishes between a leader and a follower. -- Steve Jobs (1955-2011)


devel / comp.os.cpm / Another new CP/M utility program: copyq

SubjectAuthor
* Another new CP/M utility program: copyqladislau szilagyi
+- Another new CP/M utility program: copyqfridtjof.ma...@gmail.com
`* Another new CP/M utility program: copyqfridtjof.ma...@gmail.com
 `* Another new CP/M utility program: copyqladislau szilagyi
  `- Another new CP/M utility program: copyqladislau szilagyi

1
Another new CP/M utility program: copyq

<dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4240&group=comp.os.cpm#4240

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ad4:5894:0:b0:623:63b8:d49e with SMTP id dz20-20020ad45894000000b0062363b8d49emr613612qvb.2.1685301834502;
Sun, 28 May 2023 12:23:54 -0700 (PDT)
X-Received: by 2002:ac8:7d86:0:b0:3ef:3b04:b8e2 with SMTP id
c6-20020ac87d86000000b003ef3b04b8e2mr2098993qtd.0.1685301834291; Sun, 28 May
2023 12:23:54 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 28 May 2023 12:23:53 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=86.125.83.230; posting-account=Zav8fAoAAACRqOOZYggbw7GhvvIJEzFn
NNTP-Posting-Host: 86.125.83.230
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
Subject: Another new CP/M utility program: copyq
From: ladislau_szilagyi@euroqst.ro (ladislau szilagyi)
Injection-Date: Sun, 28 May 2023 19:23:54 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1604
 by: ladislau szilagyi - Sun, 28 May 2023 19:23 UTC

Hi,

COPYQ ( https://github.com/Laci1953/RC2014-CPM/tree/main/copyq )

Copy with query

Use: copyq filename.ext d:

copy files to destination disk (d:), with a query for each file
( and an extra query to allow overwriting files )
( ambiguous file references may be used, e.g. *.c or test?.asm )
( up to 512 files can be copied )

Example:

c>dir *.1
C: Y 1 : X 1
c>dir d:*.1
D: Y 1
c>copyq *.1 d:

Copy file Y.1 ? (Y/y = yes) :y
Overwrite destination file ? (Y/y = yes) :y
Copy file X.1 ? (Y/y = yes) :y
c>dir d:*.1
D: Y 1 : X 1
c>

Ladislau

Re: Another new CP/M utility program: copyq

<0f8e8677-97cf-4e6b-9ec8-b52430dee37cn@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4243&group=comp.os.cpm#4243

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:6214:aac:b0:626:1d96:7725 with SMTP id ew12-20020a0562140aac00b006261d967725mr292730qvb.10.1685905523900;
Sun, 04 Jun 2023 12:05:23 -0700 (PDT)
X-Received: by 2002:a05:620a:1a96:b0:75b:2611:8b62 with SMTP id
bl22-20020a05620a1a9600b0075b26118b62mr5163660qkb.15.1685905523469; Sun, 04
Jun 2023 12:05:23 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.neodome.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer02.ams4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 4 Jun 2023 12:05:23 -0700 (PDT)
In-Reply-To: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:9577:4a00:af5f:c100:f9d0:c13a;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:9577:4a00:af5f:c100:f9d0:c13a
References: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0f8e8677-97cf-4e6b-9ec8-b52430dee37cn@googlegroups.com>
Subject: Re: Another new CP/M utility program: copyq
From: fridtjof.martin.weigel@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Sun, 04 Jun 2023 19:05:23 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 5624
 by: fridtjof.ma...@gmail - Sun, 4 Jun 2023 19:05 UTC

On Sunday, May 28, 2023 at 3:23:55 PM UTC-4, ladislau szilagyi wrote:
> Hi,
>
> COPYQ ( https://github.com/Laci1953/RC2014-CPM/tree/main/copyq )
>
> Copy with query
>
> Use: copyq filename.ext d:
>
> copy files to destination disk (d:), with a query for each file
> ( and an extra query to allow overwriting files )
> ( ambiguous file references may be used, e.g. *.c or test?.asm )
> ( up to 512 files can be copied )
>
> Example:
>
> c>dir *.1
> C: Y 1 : X 1
> c>dir d:*.1
> D: Y 1
> c>copyq *.1 d:
>
> Copy file Y.1 ? (Y/y = yes) :y
> Overwrite destination file ? (Y/y = yes) :y
> Copy file X.1 ? (Y/y = yes) :y
> c>dir d:*.1
> D: Y 1 : X 1
> c>
>
> Ladislau
Ladislau

Thank you for those utilities. "Back in the day"... we used sweep (nsweep)
A0% r sweep

NSWEEP - Version 2.08a 05/06/1985
(c) Dave Rand, 1983, 1984
Edmonton, Alberta

Sort directory alphabetically (Y/N)? y

Drive A0: 2952K in 121 files. 1376K free.
1. A0: !README .TXT 4K :
2. A0: +630 . 4K :

Now -
2. A0: +630 . 4K : ?
NSWEEP - Version 2.08a 05/06/1985
(c) Dave Rand, 1983, 1984
Edmonton, Alberta

A - Retag files | Q - Squeeze/Unsqueeze tagged files
B - Back one file | R - Rename file(s)
C - Copy file | S - Check remaining space
D - Delete file | T - Tag file for transfer
E - Erase T/U files | U - Untag file
F - Find file | V - View file
L - Log new disk/user | W - Wildcard tag of files
M - Mass file copy | Y - Set file status.
P - Print file | ? - Display this help
X - Exit to CP/M | cr, sp - Forward one file

2952K in 121 files. 1376K free.
Tagged files = 0K ( 0K).

2. A0: +630 . 4K :

M for mass copy, E for erase (tagged or untagged) T to tag, U to untag

Now, to achieve ERAQ we:

invoke nsweep,
W (wildcard) *.Y
(shows files tagged)
E (erase) T (tagged) Y (yes, prompt)
then, Y, N or A (abort) for each file.

Now copy (M = mass copy) did NOT have a query option -- could be added, I guess. The other program I used (and still use) is VFILER -- kind of the same as SWEEP, but visual. That one looks like:
VFILER, Version 1.7 [Z80 Code]

-- Screen Directory --
--> !README .TXT +630 . +DEFAULT. ASSIGN .SYS
AUTOEXEC.SUB AUXDICT .TXT BASLIB .REL BBC .TXT
BBCBASIC.COM BCLOAD . BRUN .COM BUFMOD .MAC
BUFMOD .REL CCP .SPR CDANSI .REL CLS .DAT
COBLBX .REL COBLIB .REL COBLOC . COBOL1 .OVR
COBOL2 .OVR COBOL3 .OVR COBOL4 .OVR COBOLX .COM
COMMAND .LBR COMPILE .MCD CONFIG .GMK CPM22 .LBR
CPMINSID.SIX CPNETLDX.COM CRCKLIST.CRC CREDIR .COM
CRTDRV .REL CSUP .REL D630 .LTP DDXTEK .PRL
DEBUG .REL DESPOOL .COM DICT .BIN DICT .D
DICTION .000 DICTIONX.COM DINDEX .BIN DSD .COM
DSD .HLP DSDZ .COM EMPTYDIC.BIN ENCODE .HLP
ENVIRON . ERRMSGS .OVR EXTRA .LBR FORLIB .REL
GENZ80 .MCD GMK .COM GMKX .COM GSX .SYS
GSXBASIX.COM INIT .SUB INIT-NOX.SUB LIBC .REL
LIBF .REL LIBRARY .MCD LINK .MCD LU .COM

A 0: Command (? for Help)?
Current File: !README .TXT

....again monospace - again, again, mass delete has a "verify" option, mass copy
does not. My preference is VFILER (I think it was part of ZCPR, but I just use it stand-alone -- then and now).

SWEEP works like LU; I don't have a "Visual LU" If that exists, would like to add that! Note that LU
even has a command -F which enters Filesweep mode. Again, that has Tag/Untag, and Mass operations.

Re: Another new CP/M utility program: copyq

<05126034-3cda-4193-ba10-8fc6fc5712ban@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4244&group=comp.os.cpm#4244

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:620a:4406:b0:75c:adce:fed8 with SMTP id v6-20020a05620a440600b0075cadcefed8mr3964039qkp.4.1685906001292;
Sun, 04 Jun 2023 12:13:21 -0700 (PDT)
X-Received: by 2002:ac8:7d8e:0:b0:3f4:7d9a:934e with SMTP id
c14-20020ac87d8e000000b003f47d9a934emr1323656qtd.11.1685906000999; Sun, 04
Jun 2023 12:13:20 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Sun, 4 Jun 2023 12:13:20 -0700 (PDT)
In-Reply-To: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2607:f2c0:9577:4a00:af5f:c100:f9d0:c13a;
posting-account=KOfC_woAAAC0YBGf-3r2aV5g2Aifd9jO
NNTP-Posting-Host: 2607:f2c0:9577:4a00:af5f:c100:f9d0:c13a
References: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <05126034-3cda-4193-ba10-8fc6fc5712ban@googlegroups.com>
Subject: Re: Another new CP/M utility program: copyq
From: fridtjof.martin.weigel@gmail.com (fridtjof.ma...@gmail.com)
Injection-Date: Sun, 04 Jun 2023 19:13:21 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: fridtjof.ma...@gmail - Sun, 4 Jun 2023 19:13 UTC

Ladislau

Now, I took an old program called CHDIR, and renamed it to CREDIR (from TOPS-10 CREATE DIRECTORY, that being where most of CP/M command design is from.... like PIP and DIR). This is HiTech C, but is "special" in that it updates itself, in place with the database of Drive/User to Name. It also has the "system password" in it... The directory and/or password could be masked with XOR PASSWORD if you want a bit more security. Have fun with this...

Find attached: <-->snip
/* CREDIR.C
*
* Also the database for directory information, and system password
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <cpm.h>
#include <unixio.h>
#include <sys.h>

#define defname "0:A:CREDIR.COM"
#define dirmax 64
/* #define syspass "password" */
#define syspass "bf109g"
#define sysuser 15
#define tryent 1
#define tryset 3

static char pass[21];

static char spass[21] = syspass;
/*
static char directory[dirmax][9] = { "SYS" };
static char dirdisk[dirmax] = { 'A' };
static char dirun[dirmax] = { 0 };
*/
static char directory[dirmax][9] = {
"SYS", "C", "GAMES", "SYSB",
"BAKSYS", "BAKC", "BAKGAMES", "SBASIC",
"BBCBASIC", "PROFOR", "SSFORT", "BASIC/Z" };
static char dirdisk[dirmax] = {
'A', 'A', 'A', 'B',
'E', 'E', 'E', 'E',
'E', 'E', 'E', 'E' };
static char dirun[dirmax] = {
0, 2, 3, 0,
0, 2, 3, 4,
5, 6, 7, 8 };
static char cend = 0;

static int tou(int c) {
if (islower(c))
return toupper(c);
return c;
}

static void strcap(char *str) {
while (*str) {
*str = tou(*str);
++str;
}
}

#if 0
static int strscan(char *str) {
while (*str)
if (*str++ == '.')
return 1;
return 0;
} #endif

static int tonum(char *str) {
int value, digit;
value = 0;
while (*str) {
digit = *str++ - '0';
if ((digit < 0) || (digit > 9))
return -1; /* Error */
value = value * 10 + digit;
}
return value;
}

static void help(void) {
printf("\nCREDIR\n\n");
printf("CREDIR is a program used to name drive/user areas, logically,\n");
printf("rather than by letter/number. From TOPS-10.\n\n");
printf(" CREDIR dirname select directory\n");
printf(" CREDIR dirname du name directory for disk d user u\n");
printf(" CREDIR /PRINT print name of current disk/user\n");
printf(" CREDIR /DISPLAY display all known names\n");
printf(" CREDIR /SETUP enter interactive setup\n");
printf(" CREDIR /HELP print HELP information\n");
}

static void disp2(void) {
int un, defined, dir;
char disk;
printf("\nCurrent Directory");
un = bdos(32, 0xff);
disk = bdos(25, 0) + 'A';
defined = 0;
printf(" %c%d: ", disk, un);
for (dir = 0; dir < dirmax; ++dir)
if ((dirdisk[dir] == disk) && (dirun[dir] == un)) {
printf("%s", directory[dir]);
defined = 1;
}
if (defined == 0)
printf("Not defined by name");
printf("\n");
}

static void display(int flag) {
/* If flag == 0, only display system files if in system dir */
int count, dir, user;
user = bdos(32, 0xff); /* Get current user number */
printf("\nDefined Directory Names");
count = 0;
for (dir = 0; dir < dirmax; ++dir) {
if ((directory[dir][0]) &&
((user >= sysuser) ||
(flag) ||
(dirun[dir] < sysuser))) {
if (count % 4 == 0)
printf("\n");
printf("%c%2d: %8s ",dirdisk[dir], dirun[dir],
directory[dir]);
}
if (directory[dir][0])
++count;
}
printf("\n%d directory names defined, space left for %d more names\n",
count, dirmax - count);
disp2();
}

static void dots(int num) {
int i;
for (i = 0; i < num; ++i)
putchar('.');
for (i = 0; i < num; ++i)
putchar('\010');
}

static void password(int n) {
int i;
if (bdos(32, 0xff) >= sysuser)
return;
printf("\n\n** System password required for access/permission **");
for (i = 0; i < n; ++i) {
printf("\nSystem Password? ");
dots(20);
scanf("%s", pass);
if (strlen(pass) > 20) {
printf("\n** Violation attempt **");
exit(-1);
}
if (strcmp(spass, pass) == 0) {
printf("** Access granted **");
return;
}
printf("Invalid password given");
}
printf("\n** Access denied **");
exit(-1);
}

static int cdir(char *dirname) {
int dir, index;
unsigned udflag;
unsigned char *p = (unsigned char *)0x004;
index = -1;
for (dir = 0; dir < dirmax; ++dir)
if (strcmp(directory[dir], dirname) == 0)
index = dir;
if (index == -1) {
printf("\nCan't find directory");
display(0);
return -1;
}
if (dirun[index] >= sysuser)
password(tryent);
udflag = dirun[index] << 4;
udflag |= dirdisk[index] - 'A';
*p = udflag;
setuid(dirun[index]); /* for SH.COM */
return 0;
}

static int yn(void) {
char s[20];
printf(" (Y/N)? ");
dots(3);
scanf("%s", s);
return tou(s[0]) == 'Y';
}

static void initdir(void) {
int i;
printf("Verify initialization");
if (!yn()) {
printf("\nInitialization aborted");
return;
}
strcpy(spass, syspass);
for (i = 0; i < dirmax; ++i) {
directory[i][0] = '\0';
dirdisk[i] = '\0';
dirun[i] = 0;
}
printf("\nDirectory cleared");
}

static int finddir(void) {
int dir;
for (dir = 0; dir < dirmax; ++dir)
if (directory[dir][0] == '\0')
return dir;
return -1;
}

static int setdir(void) {
int un, repl, dir;
char disk, name[20];
printf("\n\tDisk and user (Q=Done or A-P 0-15, like A10)? ");
scanf("%s", name);
if (strlen(name) == 0)
return 1;
disk = tou(name[0]);
if (disk == 'Q')
return 1;
if ((disk < 'A') || (disk > 'P')) {
printf("\nInvalid disk");
return 0;
}
if ((un = tonum(name + 1)) == -1)
return 1;
if ((un < 0) || (un > 15)) {
printf("\nInvalid user");
return 0;
}
do {
printf("Directory name (. = Delete old name)? ");
dots(8);
scanf("%s", name);
strcap(name);
if (strlen(name) > 8)
printf("Directory name too long\n");
} while (strlen(name) > 8);
if (name[0] == '.')
name[0] = '\0';
repl = 0;
for (dir = 0; dir < dirmax; ++dir)
if ((dirdisk[dir] == disk) && (dirun[dir] == un)) {
repl = dir;
directory[dir][0] = '\0';
}
if (repl == 0) {
repl = finddir();
if (repl == -1) {
printf("\nDirectory full");
return 1;
}
}
dirdisk[repl] = '\0';
dirun[repl] = 0;
if (strlen(name)) {
dirdisk[repl] = disk;
dirun[repl] = un;
strcat(directory[repl], name);
return 0;
}
printf("\nDirectory name for %c%2d: deleted", disk, un);
return 0;
}

static void swap(int i, int j) {
char disk, name;
int un, k;
disk = dirdisk[i];
dirdisk[i] = dirdisk[j];
dirdisk[j] = disk;
un = dirun[i];
dirun[i] = dirun[j];
dirun[j] = un;
for (k = 0; k < 9; ++k) {
name = directory[i][k];
directory[i][k] = directory[j][k];
directory[j][k] = name;
}
}

static void compare(int i, int j) {
if (dirdisk[i] < dirdisk[j])
return;
if (dirdisk[i] > dirdisk[j]) {
swap(i, j);
return;
}
if (dirun[i] > dirun[j])
swap(i, j);
}


Click here to read the complete article
Re: Another new CP/M utility program: copyq

<87d4b184-1249-4aa0-a7dd-35570921ce70n@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4246&group=comp.os.cpm#4246

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:ad4:57ad:0:b0:626:f33:c33f with SMTP id g13-20020ad457ad000000b006260f33c33fmr646811qvx.5.1685967036942;
Mon, 05 Jun 2023 05:10:36 -0700 (PDT)
X-Received: by 2002:ac8:5f0f:0:b0:3f6:b7c9:e448 with SMTP id
x15-20020ac85f0f000000b003f6b7c9e448mr1909169qta.9.1685967036710; Mon, 05 Jun
2023 05:10:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 5 Jun 2023 05:10:36 -0700 (PDT)
In-Reply-To: <05126034-3cda-4193-ba10-8fc6fc5712ban@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=86.125.83.230; posting-account=Zav8fAoAAACRqOOZYggbw7GhvvIJEzFn
NNTP-Posting-Host: 86.125.83.230
References: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com> <05126034-3cda-4193-ba10-8fc6fc5712ban@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <87d4b184-1249-4aa0-a7dd-35570921ce70n@googlegroups.com>
Subject: Re: Another new CP/M utility program: copyq
From: ladislau_szilagyi@euroqst.ro (ladislau szilagyi)
Injection-Date: Mon, 05 Jun 2023 12:10:36 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: ladislau szilagyi - Mon, 5 Jun 2023 12:10 UTC

Hi Fred,

I have problems when compiling your source file.

I tried compiling-it on a RC2014.

The results:

-------------------------
(using the original HiTech C)

D>c -v -c credir.c
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE
0:CPP -DCPM -DHI_TECH_C -Dz80 -I CREDIR.C $CTMP1.$$$
0:P1 $CTMP1.$$$ $CTMP2.$$$ $CTMP3.$$$
sys.h:
24: extern int getuid(void);
getuid: type redeclared ^
25: extern int setuid(int);
setuid: type redeclared ^
CREDIR.C: disp2()
91: int un, defined, dir;
^ un: storage class redeclared
^ defined: storage class redeclared
^ dir: storage class redeclared
^ identifier redefined: dir
94: un = bdos(32, 0xff);
^ only lvalues may be assigned to or modified
^ illegal conversion
96: defined = 0;
^ not a variable identifier: defined
^ only lvalues may be assigned to or modified
^ illegal conversion
98: for (dir = 0; dir < 64; ++dir)
^ undefined identifier: dir
99: if ((dirdisk[dir] == disk) && (dirun[dir] == un)) {
type conflict ^
simple type required for == ^
101: defined = 1;
^ not a variable identifier: defined
^ only lvalues may be assigned to or modified
^ illegal conversion
103: if (defined == 0)
^ not a variable identifier: defined
^ illegal use of void expression
106: }
^ unused member: dir (warning)
CREDIR.C: cdir()
164: int dir, index;
^ index: storage class redeclared
^ identifier redefined: index
167: index = -1;
^ not a variable identifier: index
^ only lvalues may be assigned to or modified
^ illegal conversion
170: index = dir;
^ not a variable identifier: index
^ only lvalues may be assigned to or modified
^ illegal conversion
171: if (index == -1) {
^ not a variable identifier: index
^ illegal use of void expression
176: if (dirun[index] >= 15)
^ not a variable identifier: index
^ illegal type for index expression
type conflict ^
178: udflag = dirun[index] << 4;
^ not a variable identifier: index
^ illegal type for index expression
type conflict ^
179: udflag |= dirdisk[index] - 'A';
^ not a variable identifier: index
^ illegal type for index expression
type conflict ^
181: setuid(dirun[index]);
^ not a variable identifier: index
^ illegal type for index expression
type conflict ^
CREDIR.C: writepgm()
320: unsigned u;
^ u: storage class redeclared
^ identifier redefined: u
324: fd = open(fname, O_RDWR);
^ undefined identifier: O_RDWR
329: u = (unsigned)&cend - (unsigned)spass;
^ only lvalues may be assigned to or modified
illegal conversion ^
330: lseek(fd, (long)spass - (long)0x100, SEEK_SET);
undefined identifier: SEEK_SET ^
331: write(fd, (void *)spass, u);
illegal conversion ^
334: }
^ unused variable definition: ÜÞï#ª>Ïc"Ç;»Æà(ª¢è:+\
­ö< ?
ï?p?í (warning)
CREDIR.C: readpgm()
339: fd = open("0:A:CREDIR.COM", O_RDWR);
^ undefined identifier: O_RDWR
342: u = (unsigned)&cend - (unsigned)directory;
^ undefined identifier: u
illegal conversion ^
343: lseek(fd, (long)directory - (long)0x100, SEEK_SET);
illegal conversion ^
not a variable identifier: SEEK_SET ^
illegal conversion ^
344: read(fd, (void *)directory, u);
^ : storage class redeclared
illegal conversion ^

(********************************** here, P1 crashes... rebooting...then replacing P1 with 'my' P1...)

Small Computer Monitor - S3
*cpm
RC2014 CP/M BIOS 1.2 by G. Searle 2007-18

CP/M 2.2 Copyright 1979 (c) by Digital Research

A>d:
D>pip p1.com=newp1.com

D>c -v -c credir.c
HI-TECH C COMPILER (CP/M-80) V3.09
Copyright (C) 1984-87 HI-TECH SOFTWARE
0:CPP -DCPM -DHI_TECH_C -Dz80 -I CREDIR.C $CTMP1.$$$
0:P1 $CTMP1.$$$ $CTMP2.$$$ $CTMP3.$$$
sys.h:
24: extern int getuid(void);
getuid: type redeclared ^
25: extern int setuid(int);
setuid: type redeclared ^
CREDIR.C: writepgm()
324: fd = open(fname, O_RDWR);
^ Error #72 O_RDWR
330: lseek(fd, (long)spass - (long)0x100, SEEK_SET);
Error #72 SEEK_SET ^
CREDIR.C: readpgm()
339: fd = open("0:A:CREDIR.COM", O_RDWR);
Error #72 O_RDWR ^
343: lseek(fd, (long)directory - (long)0x100, SEEK_SET);
Error #72 SEEK_SET ^
ERA $CTMP1.$$$
ERA $CTMP2.$$$
ERA $CTMP3.$$$
ERA $$EXEC.$$$

D>grep *.h

please enter the string to be searched, followed by a <CR>:getuid
CPM.H
SYS.H
D>grep *.h

please enter the string to be searched, followed by a <CR>:O_RDWR
D>grep *.h

please enter the string to be searched, followed by a <CR>:SEEK_SET
D>
----------------------

So, it seems there is a conflict between CPM.H and SYS.H (both contain a (different) prototype of getuid ...), and I cannot find any .H containing the definitions of O_RDWR and SEEK_SET.

Ladislau

Re: Another new CP/M utility program: copyq

<cafee0a0-c13a-4556-a5cf-7392ed748aeen@googlegroups.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=4247&group=comp.os.cpm#4247

  copy link   Newsgroups: comp.os.cpm
X-Received: by 2002:a05:622a:1302:b0:3f9:e01:4fa6 with SMTP id v2-20020a05622a130200b003f90e014fa6mr1048046qtk.8.1685987916199;
Mon, 05 Jun 2023 10:58:36 -0700 (PDT)
X-Received: by 2002:a05:620a:1721:b0:75c:ada7:b8cc with SMTP id
az33-20020a05620a172100b0075cada7b8ccmr133665qkb.7.1685987916018; Mon, 05 Jun
2023 10:58:36 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.cpm
Date: Mon, 5 Jun 2023 10:58:35 -0700 (PDT)
In-Reply-To: <87d4b184-1249-4aa0-a7dd-35570921ce70n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=86.125.83.230; posting-account=Zav8fAoAAACRqOOZYggbw7GhvvIJEzFn
NNTP-Posting-Host: 86.125.83.230
References: <dc39ed31-d808-4bf1-806d-fb4efa0fd2abn@googlegroups.com>
<05126034-3cda-4193-ba10-8fc6fc5712ban@googlegroups.com> <87d4b184-1249-4aa0-a7dd-35570921ce70n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cafee0a0-c13a-4556-a5cf-7392ed748aeen@googlegroups.com>
Subject: Re: Another new CP/M utility program: copyq
From: ladislau_szilagyi@euroqst.ro (ladislau szilagyi)
Injection-Date: Mon, 05 Jun 2023 17:58:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1406
 by: ladislau szilagyi - Mon, 5 Jun 2023 17:58 UTC

Hi,

problem solved: I commented-out sys.h and added two defines:

//#include <sys.h>

#define O_RDWR _IORW
#define SEEK_SET 0

Ladislau

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor