Skip to content

Commit

Permalink
More zmodem cleanups.
Browse files Browse the repository at this point in the history
* Start to use types from cstdint vs. built in types.
* Make zmodemlog use fmt::format format types.
* Cleanup the logging a bit more
* Implement ZIFlush to purge the inbound queueue.  We can't purge
  outbound since we never have anything waiting to be sent.
  • Loading branch information
wwiv committed Jan 17, 2021
1 parent cf5d9fa commit bb8cbe9
Show file tree
Hide file tree
Showing 11 changed files with 196 additions and 244 deletions.
5 changes: 3 additions & 2 deletions bbs/prot/reference/checkcrc.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#ifndef lint
static const char rcsid[] = "$Id$" ;
#endif
Expand Down Expand Up @@ -98,9 +99,9 @@ static int addcrc(int data, int crc) ;
main()
{
u_short crc16 ;
u_long crc32 ;
uint32_t crc32 ;
int i,j ;
u_long k ;
uint32_t k ;
u_char *msg = msg0 ;
int len = sizeof(msg0) ;

Expand Down
3 changes: 2 additions & 1 deletion bbs/prot/reference/main.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#ifndef lint
static const char rcsid[] = "$Id$" ;
#endif
Expand Down Expand Up @@ -709,7 +710,7 @@ ZAttn(ZModem *info)


FILE *
ZOpenFile(char *name, u_long crc, ZModem *info)
ZOpenFile(char *name, uint32_t crc, ZModem *info)
{
struct stat buf ;
int exists ; /* file already exists */
Expand Down
3 changes: 2 additions & 1 deletion bbs/prot/reference/receive.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#ifndef lint
static const char rcsid[] = "$Id$" ;
#endif
Expand Down Expand Up @@ -477,7 +478,7 @@ ZAttn(info)
FILE *
ZOpenFile(name, crc, info)
char *name ;
u_long crc ;
uint32_t crc ;
ZModem *info ;
{
struct stat buf ;
Expand Down
3 changes: 2 additions & 1 deletion bbs/prot/reference/send.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#ifndef lint
static const char rcsid[] = "$Id$" ;
#endif
Expand Down Expand Up @@ -308,7 +309,7 @@ ZOpenFile(name, f0,f1,f2,f3, len, date, mode, filesRem, bytesRem, crc)
char *name ;
int f0,f1,f2,f3, len, mode, filesRem, bytesRem ;
long date ;
u_long crc ;
uint32_t crc ;
{
}

Expand Down
5 changes: 3 additions & 2 deletions bbs/prot/reference/zmodemdump.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <cstdint>
#ifndef lint
static const char rcsid[] = "$Id$" ;
#endif
Expand Down Expand Up @@ -81,7 +82,7 @@ typedef struct {
int zdlePend ; /* ZDLE received */
int crcCmd ;
int crclen ;
u_long crc ;
uint32_t crc ;
} Zinfo ;

u_char buffer[MAXBUF] ;
Expand Down Expand Up @@ -432,7 +433,7 @@ assert(i < MAXHBUF) ;
displayHeader( Zinfo *info )
{
int i ;
u_long crc ;
uint32_t crc ;
int h32 = info->state == Header32 ;
static char *names[] = {
"ZRQINIT", "ZRINIT", "ZSINIT", "ZACK", "ZFILE", "ZSKIP",
Expand Down
Loading

0 comments on commit bb8cbe9

Please sign in to comment.