public inbox for speakup@linux-speakup.org
 help / color / mirror / Atom feed
From: Tyler Spivey <tspivey8@home.com>
To: speakup@braille.uwo.ca
Subject: 2 small utilities i wrote
Date: Sat, 1 Dec 2001 14:59:29 -0800	[thread overview]
Message-ID: <20011201225929.BWHE21774.femail12.sdc1.sfba.home.com@tspivey8> (raw)

code's at the bottom.
not too well written, but they do what they are supposed to do , in my tests.
-- ac2t.c --
/* 
program name: ac2t
this program takes input from stdin and outputs to stdout.
summary: converts input of the form:
ascii-code
ascii-code
..
to the result of those codes.
-1 == eof.
*/
#include <stdio.h>
int main() {
int ch;
while (!feof(stdin)) {
scanf("%d\n",&ch);
printf("%c",ch);
}
}

-- t2ac.c --

/*
program name: t2ac
this program takes input from stdin and outputs to stdout.
summary: converts text to ascii codes, 1 per line. example:
32
65
72
..
-1 (end)
*/
#include <stdio.h>
main() {
int ch;
while (!feof(stdin)) {
ch = getc(stdin); /* get from stdin */
/* print the ascii code, one per line. */
printf("%d\n",ch);
} /* while */
} /* main */
--


             reply	other threads:[~ UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
 Tyler Spivey [this message]
 ` Dave Hunt
   ` bz2 files randy turner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011201225929.BWHE21774.femail12.sdc1.sfba.home.com@tspivey8 \
    --to=tspivey8@home.com \
    --cc=speakup@braille.uwo.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).