Settings

The page will reload to apply your changes.
Theme

ASCII Art Font

ASCII Art Menu

Original Usenet message from alt.ascii-art, 22 Mar 1994.
slow show command with loops

slow show command with loops

For those animations like globe.vt.
The first argument is the name of the animation.
The second (optional) is the number of times it will be played.
The third (optional) is the delay.

Christoph
---
p70...@sunmail.lrz-muenchen.de


----------------  cut here  ---------------------
/* slow cat by Christoph Hager */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define DELAY 1  /* test how fast your system is */

void sleep(int);
Main(argc, argv)   
int argc;
char *argv[];
{
FILE *in;
fpos_t pos;
char ch,*line,linea[90];
int i,t,delay;

	if (argc < 2 || (argc==3 && !atoi(argv[2])) || (argc==4 && !atoi(argv[2]) && !atoi(argv[3])) || argc > 4) {
		printf ("Usage: %s <name of file> <number of loops>\n",argv[0]);
		exit(1);
	}
	if (argc==3) { t=atoi(argv[2]); delay=DELAY; }
	else if (argc==4) { t=atoi(argv[2]); delay=atoi(argv[3]); }
	else { t=1; delay=DELAY; }
	if ((in = fopen(argv[1], "r")) == NULL) {
		fprintf (stderr, "Error: Can't read %s\n", argv[1]);
		exit(1);
	}
	fgetpos(in,&pos);
	for (i=0;i<t;i++) {
		while (!feof(in)) {
			putc(getc(in),stdout);
			sleep(DELAY);
		}
		fsetpos(in,&pos);
	}
} 
void sleep(delay)  
int delay;
{
long int t;
	for (t=0;t<delay*1000;t++) ;
}

Original message headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f996b,fd9bbed9fa68d337,start
X-Google-Attributes: gidf996b,public
X-Google-ArrivalTime: 1994-03-22 09:33:32 PST
Path: gmd.de!newsserver.jvnc.net!netnews.upenn.edu!msuinfo!agate!howland.reston.ans.net!EU.net!Germany.EU.net!gsf.de!not-for-mail
From: hag...@cony.gsf.de (Christoph Hager)
Newsgroups: alt.ascii-art
Subject: slow show command with loops
Date: 22 Mar 1994 18:33:32 +0100
Organization: GSF Forschungszentrum fuer Umwelt und Gesundheit mbH
Lines: 54
Message-ID: <2mna5c$cl...@cony.gsf.de>
NNTP-Posting-Host: cony.gsf.de

Related ASCII art in the Gallery

Explore these categories from our collection of 11,000+ artworks:

About this message. This message was posted publicly to the newsgroup alt.ascii-art in 1994 and is 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 the author? 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.

Help classify this post