Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
ECHO.C
Package: teco.zip [view]
Upload User: xiantiandi
Upload Date: 2007-01-06
Package Size: 21k
Code Size: 1k
Category:
Editor
Development Platform:
DOS
- #include <ctype.h>
- #include <stdio.h>
- #include <string.h>
- static char last='';
- static char this='';
- echo(c) /* Echo char appropriately on console */
- {
- #include "teco.h"
- if (cancel) return; /* Skip if ^O sent */
- this=toascii(c); /* Mask off parity */
- if (this == 27) { /* Check for <ESC> */
- this='$'; /* ..if so echo $ */
- } else { /* Else process it */
- if (iscntrl(this)) {
- if (this == 10) {
- if (last == 13) {
- last=this;
- return;
- } else {
- fprintf(stderr,"n");
- goto check;
- }
- } else {
- if (this == 13) {
- fprintf(stderr,"n");
- goto check;
- }
- if (this == 9) {
- fprintf(stderr,"11");
- goto check;
- } else {
- fprintf(stderr,"^");
- this=this+64;
- }
- }
- }
- }
- fprintf(stderr,"%c",this);
- last=this;
- return;
- check: last=this;
- if (kbhit()) {
- if (15 == toascii(getch())) {
- cancel=1;
- fprintf(stderr,"^On");
- }
- }
- }