Commit 19199404 by kollo

version 1.12-3

parent a2213fb3
......@@ -5,12 +5,10 @@
</HEAD>
<BODY>
<H1>Index of /examples/3D-graphics</H1>
<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A>
<A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
<HR>
<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/examples/">Parent Directory</A> 11-Sep-2003 18:17 -
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="3Dshow.bas">3Dshow.bas</A> 9k<A HREF="../screenshots/3Dshow.png">(Screenshot)</A>
<pre>
<A HREF="../">Parent Directory</A>
<A HREF="3Dshow.bas">3Dshow.bas</A> 9k<A HREF="../../screenshots/3Dshow.png">(Screenshot)</A>
</PRE><HR>
<ADDRESS>Apache/1.3.26 Server at x11-basic.sourceforge.net Port 80</ADDRESS>
</BODY></HTML>
......@@ -5,16 +5,15 @@
</HEAD>
<BODY>
<H1>Index of /examples/console</H1>
<PRE><IMG SRC="/icons/blank.gif" ALT=" "> <A HREF="?N=D">Name</A> <A HREF="?M=A">Last modified</A>
<A HREF="?S=A">Size</A> <A HREF="?D=A">Description</A>
<HR>
<IMG SRC="/icons/back.gif" ALT="[DIR]"> <A HREF="/examples/">Parent Directory</A> 11-Sep-2003 18:17 -
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="console_clock.bas">console_clock.bas</A> 5k<A HREF="../screenshots/console_clock.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="g_line.bas">g_line.bas</A> 2k <A HREF="../screenshots/g_line.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="laufschrift.bas">laufschrift.bas</A> 24k <A HREF="../screenshots/laufschrift.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="maze.bas">maze.bas</A> 2k <A HREF="../screenshots/maze.png">(Screenshot)</A>
<IMG SRC="/icons/unknown.gif" ALT="[ ]"> <A HREF="timetext.bas">timetext.bas</A> 25k <A HREF="../screenshots/timetext.png">(Screenshot)</A>
<pre>
<A HREF="/examples/">Parent Directory</A>
<A HREF="console_clock.bas">console_clock.bas</A> 5k <A HREF="../../screenshots/console_clock.png">(Screenshot)</A>
<A HREF="g_line.bas">g_line.bas</A> 2k <A HREF="../../screenshots/g_line.png">(Screenshot)</A>
<A HREF="laufschrift.bas">laufschrift.bas</A> 24k <A HREF="../../screenshots/laufschrift.png">(Screenshot)</A>
<A HREF="maze.bas">maze.bas</A> 2k <A HREF="../../screenshots/maze.png">(Screenshot)</A>
<A HREF="timetext.bas">timetext.bas</A> 25k <A HREF="../../screenshots/timetext.png">(Screenshot)</A>
</PRE><HR>
<ADDRESS>Apache/1.3.26 Server at x11-basic.sourceforge.net Port 80</ADDRESS>
</BODY></HTML>
This folder contains serveral non-X11-basic programs,
which are used from within some of the example programs.
All Programms are GPL.
# Text scrambling utility used by brabbel.cgi:
brabbel.c gcc brabbel.c -o brabbel
# Picture generation program for mandel.gci, mandelgif.cgi and
# mandelposter.cgi:
mandelraw.c
colormap
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define FALSE 0
#define TRUE (!FALSE)
#define PI 3.141592654
#define E 2.718281828
char version[]="1.01";
char ifilename[100]="input.txt";
int b[3000];
int stat[256];
int n=200;
int doauto=FALSE;
double anfang=-.6;
double ende=.6;
char *buffer;
char old[20];
int intellig=4;
long laenge;
long alaenge=10000;
void usage(){
printf("\n Bedienungsanleitung: \n");
printf(" -------------------- \n\n");
printf("Das Programm kann mit folgenden Parametern aufgerufen werden: \n");
printf("\n");
printf("-input file --- Einlesefile [%s]\n",ifilename);
printf("-intelligenz [1-10] --- IQ [%d]\n",intellig);
printf("-laenge --- Ausgabelaenge [%d]\n",alaenge);
printf("\n");
}
void intro(){
printf("***************************************************************\n");
printf("* BRABBEL V. %s *\n",version);
printf("* von Markus Hoffmann 1997 *\n");
printf("* *\n");
printf("* *\n");
printf("* Programmversion vom 11.01.2006 *\n");
printf("* *\n");
printf("***************************************************************\n\n");
}
void init(int anzahl, char *argumente[]) {
int count;
/* Kommandozeile bearbeiten */
for(count=0;count<anzahl;count++) {
if (strcmp(argumente[count],"-input")==FALSE) strcpy(ifilename,argumente[count+1]);
else if (strcmp(argumente[count],"-intelligenz")==FALSE) intellig=atoi(argumente[count+1]);
else if (strcmp(argumente[count],"-laenge")==FALSE) alaenge=atoi(argumente[count+1]);
}
}
int irandom(int m) { return((random() & 0xffff)*m/0x10000); }
char getbest(){
int best,i,sum=0,zu;
for(i=0;i<256;i++) sum+=stat[i];
/*for(i=0;i<256;i++) printf("[%d] ",stat[i]);*/
if(sum==0) { printf("\n");
fprintf(stderr,"\n SUMERROR <%s>\n",old);
strncpy(old,buffer,intellig);
return(buffer[intellig]);
}
zu=irandom(sum);
for(i=0;i<256;i++) {
zu-=stat[i];
if(zu<0) return(i);
}
fprintf(stderr,"ERROR\n");
return(-1);
}
void dostat() {
char *pos;
/*printf("[[[%s]]]\n",old);*/
pos=strstr(buffer,old);
if(pos>buffer+laenge-intellig) printf("\n Text ist auf das Ende gelaufen.\n");
while(pos && pos<buffer+laenge) {
/*printf("%d\n",pos[0]);*/
stat[(unsigned int)pos[intellig] & 0xff]++;
/* printf("dostat: <%x> <%s> <%c>",pos,old,pos[intellig]);*/
pos=strstr(pos+1,old);
}
return;
}
long lof( FILE *n) {
long laenge,position;
position=ftell(n);
if(fseek(n,0,2)==0){
laenge=ftell(n);
if(fseek(n,position,0)==0)return(laenge);
else return(-1);
} else return(-1);
}
main(int anzahl, char *argumente[]) {
FILE *dptr,*dptr2;
float se;
char string[2];
char zeile[100],dummy[50],zz[80];
int i,j=0,k,count;
if(anzahl<=2) {intro(); usage(); return(0);} /* zu weinig Parameter */
init(anzahl, argumente); /* Kommandozeile einlesen */
srandom(200);
dptr2=fopen(ifilename,"r");
laenge=lof(dptr2);
printf(" %s %d [",ifilename,laenge);
buffer=malloc(laenge+1);
j=fread(buffer,1,laenge,dptr2);
fclose(dptr2);
printf("] %d\n",j);
buffer[laenge+1]=0;
strncpy(old,buffer,intellig);
for(count=0;count<alaenge;count++) {
for(i=0;i<256;i++) stat[i]=0;
dostat();
string[0]=getbest();
for(i=1;i<intellig;i++) old[i-1]=old[i];
old[intellig-1]=string[0];
printf("%c",string[0]);
}
free(buffer);
}
<html><head><title>xbasic&#47;examples2&#47;contrib&#47;</title></head>
<body>
<h2>Directory &#47;home&#47;hoffmann&#47;c&#47;xbasic&#47;examples2&#47;contrib&#47;</h2><pre>drwxr-x--- 19 hoffmann users 568 Jan 28 14:52 <a href="../">..</a>
333 Jan 28 18:10 <a href="README">README</a>
3747 Jan 28 15:00 <a href="brabbel.c">brabbel.c</a>
4096 Jan 6 2001 <a href="colormap">colormap</a>
3041 Jan 28 18:21 <a href="mandelraw.c">mandelraw.c</a>
</pre></body></html>
/******************************************************************/
/* */
/* Routine fuer die 2-D Mandelbrot-Grafikausgabe */
/* */
/* little program to produce Mandelbrod fractals */
/* output is a raw image (256 colors) default size: 256x256 */
/* */
/* to produce a gif-image: */
/* mandelraw | raw2gif -p colormap -s 256 256 > my.gif */
/* */
/* compile: gcc mandelraw.c -o mandelraw */
/* */
/* */
/* (c) Markus Hoffmann 1995 Letzte Bearbeitung: 30.03.1996 */
/* */
/******************************************************************/
/* INCLUDEs */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define val(a) atof(a)
/*********************************************************************/
/* GLOBALe VARIABLEn */
/*********************************************************************/
double ymin,ymax,xmin,xmax;
/* Arbeitsbereich (Koordinatenbox) */
int bx=0,by=0,bw=256,bh=256;
/* DEFAULT Werte */
double xxmin=-0.75;
double xxmax=-.722;
double yymin=0.155;
double yymax=0.18;
int kx(double x) {return((x-xmin)*bw/(xmax-xmin)+bx);}
int ky(double y) {return(-bh/(ymax-ymin)*(y-ymax)+by);}
double ox(int x) {return((x-bx)*(xmax-xmin)/bw+xmin);}
double oy(int y) {return(-(y-by)*(ymax-ymin)/bh+ymax);}
typedef struct { double re; double im; } complex;
void doredraw() {
int i,j,k,l,o,x,y;
double cz1,ii,jj;
complex z;
xmin=xxmin; ymin=yymin; xmax=xxmax; ymax=yymax;
x=bx;y=by;
k=by+bh;
l=bx+bw;
for(j=y;j<k;j++) {
for(i=x;i<l;i++) {
z.re=0; z.im=0; ii=ox(i); jj=oy(j);
for(o=0;o<256;o++) {
cz1=z.re*z.re-z.im*z.im+ii;
z.im=2*z.re*z.im+jj;
z.re=cz1;
if((z.re*z.re+z.im*z.im)>16) break;
}
printf("%c",o);
}
}
}
void usage(){
fprintf(stderr,"\n Usage:\n ------ \n");
fprintf(stderr," mandelraw <x1> <x2> <y1> <y2> [<bw> <bh>]\n\n");
fprintf(stderr," x1 -- Koordinate\n");
fprintf(stderr," x2 -- Koordinate\n");
fprintf(stderr," y1 -- Koordinate\n");
fprintf(stderr," y2 -- Koordinate\n");
fprintf(stderr," bw -- image width in pixels\n");
fprintf(stderr," bw -- image height in pixels\n");
fprintf(stderr,"\n");
}
int main (int argc, char *argv[]) {
if(argc>=5) {
xxmin=val(argv[1]);
xxmax=val(argv[2]);
yymin=val(argv[3]);
yymax=val(argv[4]);
} else usage();
if(argc>=7) {
bw=val(argv[5]);
bh=val(argv[6]);
}
doredraw() ;
return(0);
}
<TITLE>Directory listing of examples/games</TITLE>
<H1>Directory listing of examples/games</H1>
<PRE><A HREF="..">Up to higher level directory</A><BR>
<A HREF="atomium.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> atomium.bas</A> 24 Kb Sun Dec 30 23:01:48 2001 <a href="../screenshots/atomium.png">Screenshot</a>
<A HREF="civil-war.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> civil-war.bas</A> 9 Kb Jun 27 00:02
<A HREF="crap.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> crap.bas</A> 3 Kb Jun 22 20:16
<A HREF="lander.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> lander.bas</A> 3 Kb Jun 27 00:04 <a href="../screenshots/lander.png">Screenshot</a>
<A HREF="last.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> last.bas</A> 4 Kb Sun Apr 4 14:55:42 1999
<A HREF="TicTacToe.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> TicTacToe.bas</A> 3 Kb Sun Apr 4 14:55:42 1999 <a href="../screenshots/TicTacToe.png">Screenshot</a>
<A HREF="zahlenrate.bas"><IMG ALIGN=absbottom BORDER=0 SRC="internal-gopher-unknown"> zahlenrat...</A> 1 Kb Tue Sep 4 00:54:14 2001
<A HREF="atomium.bas"> atomium.bas</A> 24 Kb <a href="../../screenshots/atomium.png">Screenshot</a>
<A HREF="civil-war.bas"> civil-war.bas</A> 9 Kb
<A HREF="crap.bas"> crap.bas</A> 3 Kb
<A HREF="lander.bas"> lander.bas</A> 3 Kb <a href="../../screenshots/lander.png">Screenshot</a>
<A HREF="last.bas"> last.bas</A> 4 Kb
<A HREF="TicTacToe.bas"> TicTacToe.bas</A> 3 Kb <a href="../../screenshots/TicTacToe.png">Screenshot</a>
<A HREF="zahlenrate.bas"> zahlenrate.bas</A> 1 Kb
</PRE>
<html><head><title>examples/graphics/</title></head><body>
<h2>Directory examples/graphics/</h2><pre>
152 Feb 15 2003 <a href="../">..</a>
4513 Sep 18 2001 <a href="3Dng.bas">3Dng.bas</a> (<a href="../screenshots/3dng.png">Screenshot</a>)
2475 May 4 2002 <a href="RDS.bas">RDS.bas</a> (<a href="../screenshots/RDS1.png">Screenshot</a>)
3265 Jan 4 2003 <a href="ana_uhr.bas">ana_uhr.bas</a> (<a href="../screenshots/ana_uhr.png">Screenshot</a>)
4513 Sep 18 2001 <a href="3Dng.bas">3Dng.bas</a> (<a href="../../screenshots/3dng.png">Screenshot</a>)
2475 May 4 2002 <a href="RDS.bas">RDS.bas</a> (<a href="../../screenshots/RDS1.png">Screenshot</a>)
3265 Jan 4 2003 <a href="ana_uhr.bas">ana_uhr.bas</a> (<a href="../../screenshots/ana_uhr.png">Screenshot</a>)
768 Jan 4 2003 <a href="conv_bmp.bas">conv_bmp.bas</a>
385 Apr 4 1999 <a href="elli1.bas">elli1.bas</a> (<a href="../screenshots/elli1.png">Screenshot</a>)
2549 Oct 20 2002 <a href="kugel.bas">kugel.bas</a> (<a href="../screenshots/kugel.png">Screenshot</a>)
923 Feb 7 2003 <a href="mandel.bas">mandel.bas</a> (<a href="../screenshots/mandel.png">Screenshot</a>)
885 Feb 6 1998 <a href="netzgraf.bas">netzgraf.bas</a> (<a href="../screenshots/netzgraf.png">Screenshot</a>)
353 Jan 4 2003 <a href="plot.bas">plot.bas</a> (<a href="../screenshots/plot.png">Screenshot</a>)
1169 Sep 4 2001 <a href="space.bas">space.bas</a> (<a href="../screenshots/space.png">Screenshot</a>)
1195 Feb 28 00:36 <a href="wurm.bas">wurm.bas</a> (<a href="../screenshots/wurm.png">Screenshot</a>)
233 Oct 20 2002 <a href="zoom.bas">zoom.bas</a> (<a href="../screenshots/zoom.png">Screenshot</a>)
283 Oct 20 2002 <a href="zoom2.bas">zoom2.bas</a> (<a href="../screenshots/zoom2.png">Screenshot</a>)
385 Apr 4 1999 <a href="elli1.bas">elli1.bas</a> (<a href="../../screenshots/elli1.png">Screenshot</a>)
2549 Oct 20 2002 <a href="kugel.bas">kugel.bas</a> (<a href="../../screenshots/kugel.png">Screenshot</a>)
923 Feb 7 2003 <a href="mandel.bas">mandel.bas</a> (<a href="../../screenshots/mandel.png">Screenshot</a>)
885 Feb 6 1998 <a href="netzgraf.bas">netzgraf.bas</a> (<a href="../../screenshots/netzgraf.png">Screenshot</a>)
353 Jan 4 2003 <a href="plot.bas">plot.bas</a> (<a href="../../screenshots/plot.png">Screenshot</a>)
1169 Sep 4 2001 <a href="space.bas">space.bas</a> (<a href="../../screenshots/space.png">Screenshot</a>)
1195 Feb 28 00:36 <a href="wurm.bas">wurm.bas</a> (<a href="../../screenshots/wurm.png">Screenshot</a>)
233 Oct 20 2002 <a href="zoom.bas">zoom.bas</a> (<a href="../../screenshots/zoom.png">Screenshot</a>)
283 Oct 20 2002 <a href="zoom2.bas">zoom2.bas</a> (<a href="../../screenshots/zoom2.png">Screenshot</a>)
</pre></body></html>
#!/usr/bin/xbasic
'
' brabbel.cgi von Markus Hoffmann (Jan 2001)
' 2nd revision Jan. 2006
'
host$=""
print "Content-type: text/html"
......@@ -26,14 +27,12 @@ while len(a$)
wort_sep t$,"&",1,a$,t$
wend
t$=url$
@ersetzen
url$=@purify$(url$)
tmpfile$="/tmp/brabbeltmp"+str$(stimer)
url$=t$
if len(url$)=0
url$="http://cips01.physik.uni-bonn.de/~hoffmann/texte/party.html"
url$="http://polarfrost.homenet.all/~hoffmann/texte/party.html"
endif
if left$(url$,5)="http:"
......@@ -43,8 +42,11 @@ wort_sep url$,"/",1,uhost$,url$
url$="/"+url$
print "<HTML> <HEAD> <TITLE>Markus Hoffmann's Webgebrabbel</TITLE></HEAD>"
print "<BODY bgcolor="#ffffff" link=2200aa vlink=008800><center>"
print "<H1> Webgebrabbel</H1><HR>"
print "<BODY bgcolor="#ffffff" link=2200aa vlink=008800>"
print "<h6>(c) Markus Hoffmann 2001-2006"
version
print "</h6>"
print "<center><H1> Webgebrabbel</H1><HR>"
print "Geben Sie die Web-Seite ein, &uuml;ber die gebrabbelt werden soll. Der Intelligenzquotient bestimmt, "
print "wie sinnig der Ausgabetext sein soll: 1=unsinnig -- 10=Orginaltext. Werte 3,4,5 sind sinnvoll."
print "<form name=querybox action="+host$+"/cgi-bin/brabbel.cgi method=get>"
......@@ -105,17 +107,16 @@ data "~","-"
data "!!","!","??","?","==","=","--","-","**","*"
data "",""
procedure ersetzen
local y$,a$,b$,i
for i=20 to 255
y$="%"+right$(upper$(hex$(i)),2)
wort_sep t$,y$,1,a$,b$
while a$<>t$
t$=a$+chr$(i)+b$
wort_sep t$,y$,1,a$,b$
wend
function purify$(g$)
local i
g$=replace$(g$,"+"," ")
g$=replace$(g$,"%0A"," ")
g$=replace$(g$,"%0D"," ")
for i=0 to 255
g$=replace$(g$,"%"+upper$(hex$(i,2,2)),chr$(i))
next i
return
return g$
endfunction
function ersetze$(era$,erb$,erc$)
local tta$,ttb$
......
......@@ -4,9 +4,10 @@
3517 Feb 15 2003 <a href="brabbel.cgi">brabbel.cgi</a>
853 Nov 3 19:45 <a href="envtest.cgi">envtest.cgi</a>
2492 Feb 15 2003 <a href="formtomail.cgi">formtomail.cgi</a>
2510 Feb 15 2003 <a href="mandel.cgi">mandel.cgi</a>
2510 Feb 15 2003 <a href="mandel.cgi">mandel.cgi</a> <a href="../../../screenshots/mandelcgi.png">(Screenshot)</a>
886 Feb 15 2003 <a href="mandelgif.cgi">mandelgif.cgi</a>
1092 Feb 15 2003 <a href="mandelposter.cgi">mandelposter.cgi</a>
736 Nov 3 20:09 <a href="nph-redir.cgi">nph-redir.cgi</a>
2870 Jan 27 20:30 <a href="sprachserver.cgi">sprachserver.cgi</a>
</pre></body></html>
......@@ -55,22 +55,28 @@ endif
gifname$="mandelgif.cgi?x1="+str$(x1)+"&x2="+str$(x2)+"&y1="+str$(y1)+"&y2="+str$(y2)
print "<HTML> <HEAD> <TITLE>Markus Hoffmann's Mandelbrodmenge</TITLE></HEAD>"
print "<BODY bgcolor="#ffffff" link=2200aa vlink=008800><center>"
print "<H1> Die Mandelbrodmenge interaktiv</H1><HR>"
print "Klicken Sie in das Bild, um einen Bereich zu vergr&ouml;&szlig;ern. Alternativ k&ouml;nnen Sie die Koordinaten auch eingeben."
print "<BODY bgcolor="#ffffff" link=2200aa vlink=008800>"
print "<h6>(c) Markus Hoffmann 2006"
version
print "</h6>"
print "<center><H1> Die Mandelbrodmenge interaktiv</H1><HR>"
print "<form name=querybox action="+host$+"/cgi-bin/mandel.cgi method=get>"
print "<a href="+host$+"/cgi-bin/mandel.cgi?x1="+str$(x1)+"&x2="+str$(x2)+"&y1="+str$(y1)+"&y2="+str$(y2)+"><img src=/cgi-bin/"+gifname$+" ismap align=left></a>"
print "X1=<input type=text name=x1 value="+str$(x1)+" size=16><br>"
print "X2=<input type=text name=x2 value="+str$(x2)+" size=16><br>"
print "y1=<input type=text name=y1 value="+str$(y1)+" size=16><br>"
print "Y2=<input type=text name=y2 value="+str$(y2)+" size=16><br>"
print "Klicken Sie in das Bild, um einen Bereich zu vergr&ouml;&szlig;ern. Alternativ k&ouml;nnen Sie die Koordinaten auch eingeben."
print "<table><tr><td>"
print "X1=<input type=text name=x1 value="+str$(x1)+" size=18><br>"
print "X2=<input type=text name=x2 value="+str$(x2)+" size=18><br>"
print "y1=<input type=text name=y1 value="+str$(y1)+" size=18><br>"
print "Y2=<input type=text name=y2 value="+str$(y2)+" size=18><br>"
print "<td>"
print "<input value="+chr$(34)+"Koordinaten Berechnen"+chr$(34)+" type="+chr$(34)+"submit"+chr$(34)+">"
print "<a href="+host$+"/cgi-bin/mandel.cgi?> Zur&uuml;ck zum Start </a><p>"
print "<a href="+host$+"/cgi-bin/mandelposter.cgi?x1="+str$(x1)+"&x2="+str$(x2)+"&y1="+str$(y1)+"&y2="+str$(y2)+"> Ausschnitt als 800x800 Poster </a>"
print "<input type=hidden name=format value=2>"
print "</table>"
print "</form><p></center><HR><br>"
print "<I>Kommentare oder Anregungen zu dieser WWW-Seite bitte "
print "<A HREF=mailto:hoffmann@physik.uni-bonn.de>hierhin</A>.</I><P>"
print "<A HREF=mailto:hoffmann@homenet.all>hierhin</A>.</I><P>"
print "<FONT FACE="+chr$(34)+"ARIAL,HELVETICA"+chr$(34)+" SIZE=1>"
print "Erzeugt am "+time$+" "+date$
print "</FONT></BODY></HTML>"
......
......@@ -26,6 +26,5 @@ else
wort_sep t$,"&",1,a$,t$
wend
endif
' print "/usr/local/bin/mandelraw "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" | raw2gif -p /home/hoffmann/bin/colormap -s 256 256 > /tmp/testm.gif"
system "echo 'Content-type: image/png';echo ; /usr/local/bin/mandelraw "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" | raw2gif -p /usr/local/httpd/cgi-bin/colormap -s 256 256 | /usr/X11R6/bin/giftopnm | /usr/X11R6/bin/pnmtopng -inter"
system "echo 'Content-type: image/gif';echo ; /usr/local/bin/mandelraw "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" | raw2gif -p /srv/www/cgi-bin/colormap -s 256 256 "
quit
......@@ -27,13 +27,11 @@ else
wort_sep t$,"&",1,a$,t$
wend
endif
r$=env$("REMOTE_ADDR")
h$=env$("REMOTE_HOST")
open "A",#1,"/tmp/WEBMANDEL.log"
r$=env$("REMOTE_ADDR")
h$=env$("REMOTE_HOST")
open "A",#1,"/tmp/WEBMANDEL.log"
print #1,date$+" "+time$+" "+r$+" "+h$+" Poster: "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)
close #1
' print "/usr/local/bin/mandelraw "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" | raw2gif -p /home/hoffmann/bin/colormap -s 256 256 > /tmp/testm.gif"
system "echo 'Content-type: image/png';echo ; /usr/local/bin/mandelraw800 "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" | raw2gif -p /usr/local/httpd/cgi-bin/colormap -s 800 800 | /usr/X11R6/bin/giftopnm | /usr/X11R6/bin/pnmtopng -inter"
close #1
system "echo 'Content-type: image/gif';echo ; nice /usr/local/bin/mandelraw "+str$(x1)+" "+str$(x2)+" "+str$(y1)+" "+str$(y2)+" 800 800 | raw2gif -p /srv/www/cgi-bin/colormap -s 800 800"
quit
#!/usr/bin/xbasic
'
' Web-Interface fuer das Sprach-Synthesizersystem (c) Markus Hoffmann 2006
'
'
host$=""
stimme$()=["","weiblich 1","m&auml;nnlich 2","weiblich 3","m&auml;nnlich 4","weiblich 5","m&auml;nnlich 6","weiblich 7","f&uuml;r bayrisch"]
print "Content-type: text/html"
print
t$=env$("REQUEST_URI")
wort_sep t$,"?",1,a$,t$
wort_sep t$,"?",1,t$,u$
if len(t$)<2
x1=-2
y1=-2
x2=2
y2=2
else
wort_sep t$,"&",1,a$,t$
while len(a$)
wort_sep a$,"=",1,a$,b$
if a$="v"
voice$=b$
else if a$="d"
dehn$=b$
else if a$="f"
freq$=b$
else if a$="text"
text$=@purify$(b$)
endif
wort_sep t$,"&",1,a$,t$
wend
endif
if len(voice$)=0
voice$="de3"
endif
if len(freq$)=0
freq$="1"
endif
if len(dehn$)=0
dehn$="1"
endif
r$=env$("REMOTE_ADDR")
h$=env$("REMOTE_HOST")
open "A",#1,"/tmp/WEBSPEECH.log"
print #1,date$+" "+time$+" "+r$+" "+h$+" "+voice$+" "+text$
close #1
flush
if len(text$)
system "export PATH=/usr/bin:/usr/local/bin ; txt2snd -v "+voice$+" -f "+freq$+" -d "+dehn$+" -s "+chr$(34)+text$+chr$(34)+""
flush
endif
print "<HTML> <HEAD> <TITLE>Markus Hoffmann's Sprachinterface</TITLE></HEAD>"
print "<BODY bgcolor="#ffffff" link=2200aa vlink=008800>"
print "<h6>(c) Markus Hoffmann 2006"
version
print "</h6>"
print "<center><H1> Sprachausgabeinterface "+env$("HTTP_HOST")+":</H1><HR>"
print "Tippen Sie hier bitte einen deutschsprachigen Text ein. Dieser wird dann auf dem Sprachserver ausgegeben"
print "Sie k&ouml;nnen weiterhin die Stimme ausw&auml;hlen, sowie das Sprachtempo und die Tonlage."
print "<p>"
print "<form name=querybox action="+host$+"/cgi-bin/sprachserver.cgi method=get>"
print "Stimme: <select name=v>"
for i=1 to 8
print "<option value=de"+str$(i);
if val(right$(voice$))=i
print " selected";
endif
print ">"+stimme$(i)+"</option>"
next i
print "</select><P>"
print "Tonh&ouml;he: <INPUT type=text name=f value="+chr$(34)+freq$+chr$(34)+" size=5 maxlength=5><br>"
print "Sprechtempo: <INPUT type=text name=d value="+chr$(34)+dehn$+chr$(34)+" size=5 maxlength=5><br>"
print "Text=<TEXTAREA name=text ROWS="5" COLS="70" maxlength=1024 >"
print text$
print "</TEXTAREA><p>"
print "<input value="+chr$(34)+"Text ausgeben"+chr$(34)+" type="+chr$(34)+"submit"+chr$(34)+">"
print "<input type=hidden name=format value=2>"
print "</form><p></center><HR><br>"
print "<I>Kommentare oder Anregungen zu dieser WWW-Seite bitte "
print "<A HREF=mailto:hoffmann@physik.uni-bonn.de>hierhin</A>.</I><P>"
print "<FONT FACE="+chr$(34)+"ARIAL,HELVETICA"+chr$(34)+" SIZE=1>"
print "Erzeugt am "+time$+" "+date$
print "</FONT></BODY></HTML>"
quit
function purify$(g$)
local i
g$=replace$(g$,"+"," ")
g$=replace$(g$,"%0A"," ")
g$=replace$(g$,"%0D"," ")
for i=0 to 255
g$=replace$(g$,"%"+upper$(hex$(i,2,2)),chr$(i))
next i
return g$
endfunction
......@@ -6,7 +6,6 @@
1786 Jul 18 2003 <a href="Fakemail.bas">Fakemail.bas</a>
83 Jul 18 2003 <a href="README">README</a>
213 Sep 16 1999 <a href="getwww.bas">getwww.bas</a>
488 Mar 7 22:28 <a href="index.html">index.html</a>
1271 Feb 15 2003 <a href="internet-dial">internet-dial</a>
238 Apr 12 2000 <a href="iserver.bas">iserver.bas</a>
586 Okt 17 21:36 <a href="udp_receive.bas">udp_receive.bas</a>
......
......@@ -3,23 +3,13 @@
' Stellt einen einfachen Frontend fuer die Internetanwahl dar
' Markus Hoffmann '9'2000
' 2. Revision 2006
' Testen, ob schon verbunden
schonflag=0
system "ps x > wvdial.log"
open "I",#1,"wvdial.log"
while not eof(#1)
lineinput #1,t$
if mid$(t$,28,6)="wvdial"
schonflag=1
pid=val(left$(t$,6))
endif
wend
close #1
system "rm -f wvdial.log"
pid=@getpid("wvdial")
sizew 1,600,130
......@@ -27,11 +17,11 @@ color get_color(0,0,0)
pbox 0,0,600,130
pause 0.3
if schonflag=0
if pid=-1
alert 0,"Wie Mchten Sie mit dem Internet |verbunden werden ?",1,"default|uni-bonn|t-link|arcor| ABBRUCH ",f
y=0
if f=1
an$=""
an$="tele2"
else if f=2
an$="uni-bonn"
else if f=3
......@@ -52,13 +42,25 @@ if schonflag=0
system "/usr/sbin/sendmail -q"
' system "xterm -geometry 80x10 -bg \#83ff6d +sb -e fetchmail --syslog &"
' system "fetchmail --syslog"
endif
else
alert 0,"Sie sind bereits im Internet.| Mchten Sie die Verbindung nun|trennen ?",1," Ja | Nein",f
if f=1
system "kill -2 "+str$(pid)
system "rm -f wvdial.log"
endif
endif
quit
function getpid(f$)
local t$,pid,a$
pid=-1
t$=system$("ps x")
while len(t$)
wort_sep t$,chr$(10),0,a$,t$
if mid$(a$,28,len(f$))=f$
pid=val(left$(a$,6))
endif
wend
return pid
endfunction
outsx=0
outsy=0
setfont "*courier-medium-r-*14*"
setfont "-*-courier-medium-r-*-*-14-*"
clearw
@gprint("Hallo, das ist ein Text....")
@gprint(" (c) Markus Hoffmann 2001")
@gprint("-----------------------------")
......@@ -10,50 +11,45 @@ if not exist(f$)
endif
open "I",#1,f$
while not eof(#1)
s=inp(#1)
@outs(s)
s=inp(#1)
@outs(s)
wend
close
end
procedure gprint(a$)
local i
for i=0 to len(a$)-1
@outs(peek(varptr(a$)+i))
next i
@outs(10)
local i
for i=0 to len(a$)-1
@outs(peek(varptr(a$)+i))
next i
@outs(10)
return
procedure outs(a)
if a=13
outsx=0
vsync
else if a=8
outsx=max(0,outsx-1)
else if a=9
outsx=min(79,8*((outsx+8) div 8))
else if a=10
inc outsy
clr outsx
vsync
if outsy>24
outsy=24