Original Usenet thread from alt.ascii-art, started 4 Feb 1995.
your mail
alt.ascii-art
· 1 message · 4 Feb 1995
On Sat, 4 Feb 1995, Coran Fisher aka The Doctor wrote: > Would you possibly explain how you go about making one line animation please? > You mentioned something about changing a line feed character to a carriage > return, how do you do that? > > Thanks! > You make a text file something like this: -----------------------------------/ cut here /------------------------------ / | \ - / | \ - -------------------------------------//------------------------------------ et cetera that has the animation in it. You then have to replace the line feed characters (0x0A) with a carraige return character (0x0D) so that the animation will print out all on one line, overstriking. The following C program will do this: -----------------------------------/ cut here /------------------------------ /* strip_linefeed.c * Usage: * strip_linefeed <infile> <outfile> * program copies infile to outfile, replacing line feed characters with * carraige return characters. */ #include <stdio.h> int main(int argc, char **argv) { int i; FILE *IN, *OUT; if(argc!=3) { printf("number of args, bozo!\n"); return(1); } IN = fopen(argv[1], "rb"); if(!IN) { printf("file error on %s\n",argv[1]); return(2); } OUT = fopen(argv[2], "wb"); if(!OUT) { printf("file error on %s\n",argv[2]); if(IN) fclose(IN); return(2); } while ((i=fgetc(IN))!=EOF) if(i!=0x0a) fputc(i, OUT); else fputc(0x0d,OUT); return(0); } -------------------------------------//------------------------------------ save the program as a seperate file named strip_linefeed.c, and compile it with: gcc strip_linefeed.c -o strip_linefeed or use whatever other c compiler is available on your system. Hope this helps. Ivor -------------------------------------------------------------- Not that it will help him, prolly. I tried fingering his address, but apperently, his sight doesn't allow outside fingering. *damn* security fascists. Ivor
Related ASCII art in the Gallery
Explore these categories from our collection of 11,000+ artworks:
_______ |.-----.| || jgs || ||_ _|| `--)-(--` __[=== o]___ |:::::::::::|\ `-=========-`()
,sSSs ,SSSS_/ ,_ sS/`))\// sS//|_(_/ _, SS\\\ `""-.-'` / sSS` jgs-==-'`'-._\
___________ | _______ | | | | | | | | | | | | | | |_______| | |___________|
//O\\
|\/\/\/| | | | | | (o)(o) C _) | ,___| | / /____\
|HHHHH/"\"\HHHHHHH| |HH`\|_.-)'|/'dP,H| |Hb.`\\_/_//'.oddH| |HHHb|`.\/\,'|HHHH| |HHHHHb/\/\/|HHHHH| |"""""""""""""""""| | |"" /\ \ / |"" | | |__/--\ \/ __| |
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 1995 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.