Git Product home page Git Product logo

supdup's Introduction

supdup's People

Contributors

ams avatar bictorv avatar dabridgham avatar johnsonjh avatar larsbrinkhoff avatar lokedhs avatar richard-mlynarik avatar sgtatham avatar wsgac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supdup's Issues

Use SAIL charset without translation to Unicode

Some older devices only support 7 or 8-bit character codes, but have a programmable font store. (I'm thinking primarily VT220 and compatible terminals.)

These devices can enable %TOSAI but does not have to translate the extended ASCII characters to Unicode.

Not building on OS X 10.12 with clang

make supdup
cc -g -o supdup -DTERMCAP supdup.c -ltermcap
supdup.c:185:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
putch (c)
^
supdup.c:190:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
supdup.c:193:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
put_newline ()
^
supdup.c:201:5: warning: implicit declaration of function 'tputs' is invalid in C99 [-Wimplicit-function-declaration]
tputs (fresh_line, 1, putch);
^
supdup.c:215:3: warning: implicit declaration of function 'ttyoflush' is invalid in C99 [-Wimplicit-function-declaration]
ttyoflush ();
^
supdup.c:216:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
supdup.c:248:30: warning: implicit declaration of function 'inet_addr' is invalid in C99 [-Wimplicit-function-declaration]
tsin.sin_addr.s_addr = inet_addr (name);
^
supdup.c:256:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
main (argc, argv)
^
supdup.c:264:7: warning: implicitly declaring library function 'exit' with type 'void (int) attribute((noreturn))' [-Wimplicit-function-declaration]
exit (1);
^
supdup.c:264:7: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
supdup.c:326:14: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (cp = strchr(line, '\n'))
~~~^~~~~~~~~~~~~~~~~~~~
supdup.c:326:14: note: place parentheses around the assignment to silence this warning
if (cp = strchr(line, '\n'))
^
( )
supdup.c:326:14: note: use '==' to turn this assignment into an equality comparison
if (cp = strchr(line, '\n'))
^
==
supdup.c:338:7: error: non-void function 'main' should return a value [-Wreturn-type]
return;
^
supdup.c:353:23: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
tsin.sin_port = atoi (argv[2]);
^
supdup.c:357:11: error: non-void function 'main' should return a value [-Wreturn-type]
return;
^
supdup.c:366:7: error: non-void function 'main' should return a value [-Wreturn-type]
return;
^
supdup.c:368:33: warning: implicitly declaring library function 'malloc' with type 'void *(unsigned long)' [-Wimplicit-function-declaration]
outstring = (unsigned char *) malloc (OUTSTRING_BUFSIZ);
^
supdup.c:368:33: note: include the header <stdlib.h> or explicitly provide a declaration for 'malloc'
supdup.c:374:3: warning: implicit declaration of function 'sup_term' is invalid in C99 [-Wimplicit-function-declaration]
sup_term ();
^
supdup.c:379:27: warning: implicit declaration of function 'inet_ntoa' is invalid in C99 [-Wimplicit-function-declaration]
printf("Trying %s ...", inet_ntoa (tsin.sin_addr));
^
supdup.c:379:27: warning: format specifies type 'char *' but the argument has type 'int' [-Wformat]
printf("Trying %s ...", inet_ntoa (tsin.sin_addr));
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~
%d
supdup.c:386:7: error: non-void function 'main' should return a value [-Wreturn-type]
return;
^
supdup.c:397:5: warning: implicit declaration of function 'supdup' is invalid in C99 [-Wimplicit-function-declaration]
supdup (net);
^
supdup.c:428:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
sup_term ()
^
supdup.c:446:3: error: function declared in block scope cannot have 'static' storage class
static void zap();
^
supdup.c:449:11: warning: implicit declaration of function 'systgetent' is invalid in C99 [-Wimplicit-function-declaration]
switch (systgetent (bp))
^
supdup.c:488:5: warning: add explicit braces to avoid dangling else [-Wdangling-else]
else
^
supdup.c:526:13: error: static declaration of 'zap' follows non-static declaration
static void zap ()
^
supdup.c:446:15: note: previous declaration is here
static void zap();
^
supdup.c:545:20: warning: implicit declaration of function 'tgetnum' is invalid in C99 [-Wimplicit-function-declaration]
tc->tcval.num = tgetnum(tc->tcname);
^
supdup.c:551:20: warning: implicit declaration of function 'tgetflag' is invalid in C99 [-Wimplicit-function-declaration]
tc->tcval.flg = tgetflag(tc->tcname);
^
supdup.c:577:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
systgetent (bp)
^
supdup.c:582:12: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
if (term = getenv ("TERM"))
~~~~~^~~~~~~~~~~~~~~~~
supdup.c:582:12: note: place parentheses around the assignment to silence this warning
if (term = getenv ("TERM"))
^
( )
supdup.c:582:12: note: use '==' to turn this assignment into an equality comparison
if (term = getenv ("TERM"))
^
==
supdup.c:583:12: warning: implicit declaration of function 'tgetent' is invalid in C99 [-Wimplicit-function-declaration]
return tgetent (bp, term);
^
supdup.c:638:13: warning: implicit declaration of function 'read' is invalid in C99 [-Wimplicit-function-declaration]
tcc = read (fd, tibuf, 1);
^
supdup.c:649:4: warning: implicit declaration of function 'select' is invalid in C99 [-Wimplicit-function-declaration]
select(fd+1, &readfds, 0, 0, 0);
^
supdup.c:658:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
supdup ()
^
supdup.c:700:11: warning: implicit declaration of function 'sleep' is invalid in C99 [-Wimplicit-function-declaration]
sleep (5);
^
supdup.c:753:15: warning: implicit declaration of function 'command' is invalid in C99 [-Wimplicit-function-declaration]
command (c);
^
supdup.c:806:9: warning: implicit declaration of function 'netflush' is invalid in C99 [-Wimplicit-function-declaration]
netflush (0);
^
supdup.c:808:9: warning: implicit declaration of function 'suprcv' is invalid in C99 [-Wimplicit-function-declaration]
suprcv ();
^
supdup.c:815:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
command (chr)
^
supdup.c:826:7: error: non-void function 'command' should return a value [-Wreturn-type]
return;
^
supdup.c:854:7: error: non-void function 'command' should return a value [-Wreturn-type]
return;
^
supdup.c:859:3: error: non-void function 'command' should return a value [-Wreturn-type]
return;
^
supdup.c:862:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
status ()
^
supdup.c:882:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
suspend ()
^
supdup.c:914:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
help ()
^
supdup.c:954:7: error: non-void function 'help' should return a value [-Wreturn-type]
return;
^
supdup.c:956:7: error: non-void function 'help' should return a value [-Wreturn-type]
return;
^
supdup.c:960:3: error: non-void function 'help' should return a value [-Wreturn-type]
return;
^
supdup.c:963:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
punt (logout_p)
^
supdup.c:983:11: error: non-void function 'punt' should return a value [-Wreturn-type]
return;
^
supdup.c:1009:7: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration]
close (net);
^
supdup.c:1014:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
quit ()
^
supdup.c:1019:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
rlogout ()
^
supdup.c:1039:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
suprcv ()
^
supdup.c:1301:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
ttyoflush ()
^
supdup.c:1315:11: warning: implicit declaration of function 'write' is invalid in C99 [-Wimplicit-function-declaration]
n = write (fileno (stdout), back, n);
^
supdup.c:1327:9: error: non-void function 'ttyoflush' should return a value [-Wreturn-type]
return;
^
supdup.c:1332:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
netflush (dont_die)
^
supdup.c:1344:13: error: non-void function 'netflush' should return a value [-Wreturn-type]
return;
^
supdup.c:1346:13: error: non-void function 'netflush' should return a value [-Wreturn-type]
return;
^
supdup.c:1437:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
top ()
^
supdup.c:1446:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int]
setescape ()
^
supdup.c:1540:7: warning: extra tokens at end of #endif directive [-Wextra-tokens]
#endif;
^
//
supdup.c:1651:3: error: "Unimplemented OS routine os_ttyinit()"

error "Unimplemented OS routine os_ttyinit()"

^
supdup.c:1666:3: error: "Unimplemented OS routine os_ttyin()"

error "Unimplemented OS routine os_ttyin()"

^
supdup.c:1677:3: error: "Unimplemented OS routine os_ttyout()"

error "Unimplemented OS routine os_ttyout()"

^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
46 warnings and 20 errors generated.
make: *** [supdup] Error 1

This issue is partially for my own note.

Ƶ

I noticed that both the Knight and Stanford keyboards has Ƶ rather than Z. And the Knight TV font also uses this form.

So in a way it would be more authentic to use Ƶ when Unicode output is enabled.

@aap pointed out that this would make copy-paste harder.

Runtime changes of terminal size

This supdup implementation could be enhanced to accept the SIGWINCH signal when the terminal size changes. But I'm not sure there's a way in the SUPDUP protocol to send this information to the host? And if there were, I'm even less confident ITS or the applications would care to handle the change.

TOPS-10 SUPDUP

@WestfW wrote to alt.sys.pdp10:

Spent most of my time on ITS via a tops10 (with local terminals at a whopping 2400bps!) running SUPDUP (had to write the SUPDUP program first, of course!) The SUPDUP client I wrote was SO much faster than the tops10 telnet client

I wonder if this SUPDUP can be found today?

Unicode?

Maybe an extension to send Unicode characters?

UTF-8 might not fit well with the SUPDUP protocol.

I have an actual application in mind: A Swedish adventure game. PDP-10/its#659

Compilation failure on OpenBSD

FWIW, this (#23 and #22) breaks on OpenBSD. Mostly due to the fact that -lresolv doesn't exist there (nor on some other BSDs), normally these days the libresolv stuff is provided directly by libc both on BSDs and GNU systems but OS X seems to not have followed suite? Dynamically adding -lresolv to the linker line is slightly tricky to do in some form of portable Make -- since everyone wants to be special.

Originally posted by @ams in #23 (comment)

Gotta merge them all!

Hello everyone,

I have checked in branches for some of the C supdup versions. There's one for @bictorv, one branched off that for @wsgac. The KLH10 code is in a separate branch until I figure out how it relates to the others.

I'll take other versions if I can find them. I believe @ams has one.

Other supdup hackers out there? @MMcM, @leighklotz?

Chaosnet domain name is added to hostname.

If the hostname doesn't have a period (".") in it, supdup adds the default Chaosnet domain name ".chaosnet.net" to it. This is passed along to the bridge NCP, which is a bit of a problem for the NCP looking up hostnames in a hosts file. @bictorv, ideas?

Unsafe strcpy used on non-OpenBSD systems.

supdup.c:
1417:  strcpy(myloc,loc);		/* save */
#ifdef __OpenBSD__
  strlcpy(myloc,loc, sizeof(myloc));        /* save */                
#else
  strcpy(myloc,loc);        /* save */
#endif /* __OpenBSD__ */

strlcpy is widely supported these days, including on Linux through libbsd.

If all else fails, the standard implementation is portable and should be able to be conditionally compiled on most systems without modification.

Using $(pkg-config --libs libbsd) to locate the library may be more correct, but adds a pkg-config dependency, obviously, which might not exist on certain embedded systems (and probably not on stock BSD systems).

I've submitted PR #26 to address this (only tested on Linux).

Edit: Updated to just use the portable implementation, since we probably don't want to do autoconf-ish tests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.