Original Usenet thread from alt.ascii-art, started 24 Mar 1994.
_ _ _ _ _ _ | | | |___ ___ _ __ ___| |_ / \ _ __ ___| |__ (_)_ _____ | | | / __|/ _ \ '_ \ / _ \ __| / _ \ | '__/ __| '_ \| \ \ / / _ \ | |_| \__ \ __/ | | | __/ |_ / ___ \| | | (__| | | | |\ V / __/ \___/|___/\___|_| |_|\___|\__| /_/ \_\_| \___|_| |_|_| \_/ \___|
Alternative approach to anims ?? (mostly unix)
alt.ascii-art
· 1 message · 24 Mar 1994
Program as promised.
Compile with
cc anim.c -lcurses -o anim
seems to work OK on our SYSVish system.
Cut out the rest of this article and save to anim.c
/* anim - create vt100 etc. codes for animation from seperate frames.
* ORIGINAL (when it was called rep)
* Ray Lubinsky University of Virginia, Dept. of Computer Science
* uucp: decvax!mcnc!ncsu!uvacs!rwl
* MODIFIED 3/85
* Bruce Karsh, Univ. Wisconsin, Madison. Dept. of Geophysics.
* uucp: uwvax\!geowhiz\!karsh
* Modified 22/2/94 - Eddie
*/
/*
Quick description.
Each 'frame' is terminated by a line starting with ^L or ^P or text <<EOP>>
(see endpage()).
For ^P it does a pause as well.
Program copies consecutive lines in each frame to screen. At end of frame
the whole screen gets updated.
Change the number in do_pause() to suit (or add code to read argv[1]).
*/
#include <curses.h>
#define NextLine fgets(buf,sizeof buf,stdin)
main()
{
char buf[BUFSIZ]; /* Buffer holds a line from 'source' */
int i;
initscr();
crmode();
nonl();
clear();
for (;;) {
for (i = 0; NextLine != NULL; i++) {
if (endpage(buf)) break;
mvaddstr(i,0,buf);
clrtoeol();
}
clrtobot();
refresh();
if (buf[0] == '\020') do_pause();
if (feof(stdin) != 0) break;
}
/* clear();*/
refresh();
endwin();
}
endpage (line)
char *line;
{
if (line[0] == '\f') return 1;
if (line[0] == '\020') return 1;
if (strcmp(line, "<<EOP>>") == 0) return 1;
return 0;
}
do_pause ()
{
int i;
for (i = 0; i < 40000; i++) putchar ('\0');
}
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
__
\ \ _ _
\**\ ___\/ \
X*#####*+^^\_\
o/\ \
\__\ .------------. |\\//\\//\\//| |//\\//\\//\\| |\\//\\//\\//| |//\\//\\//\\| '------------'
_______ /` _____ `\;, /__(^===^)__\';, / ::: \ ,; | ::: | ,;' '._______.'`jgs
_ _ (o)(o)--. \../ ( )hjw m\/m--m'`--.
_ _
/` \/ `\_ _
\ /` \/ `\
'. .\ /
\/ '. .'
\/jgs __ . . __ (o.\ \/ /.o) \__\/\/__/ /O /==\ O\ (;O/ \/ \O;)
Make your own ASCII art
Turn images, text or 3D into ASCII, or draw your own – right in your browser.
About this thread.
These messages were posted publicly to the newsgroup
alt.ascii-art
in 1994 and are mirrored here unchanged as part of the Historic Archives – only email addresses are masked.
The artwork and text belong to their original authors: if you copy a piece, keep the artist's initials or signature intact and credit them where you can.
Are you one of the authors? Contact us to get your posts attributed, connected to your artist profile, or removed.
Report this message
Help us keep the archive clean and accurate. Reports are reviewed by a person – nothing is changed automatically.