+This website is from 2008 and the information is most likely quite outdated.
+Please see the technikum29 Labs for the new website.
+You might also want to check the technikum29 Computer Museum main website.
+ -- Sven, July 2013
+
+
koeppel.homeunix.org
+
Index: /paper-tape-project/trunk/visualisator/INSTALL.txt
===================================================================
--- /paper-tape-project/trunk/visualisator/INSTALL.txt (revision 73)
+++ /paper-tape-project/trunk/visualisator/INSTALL.txt (revision 73)
@@ -0,0 +1,3 @@
+Maken:
+
+* Ubuntu: apt-get install libcairo
Index: /paper-tape-project/trunk/visualisator/Makefile
===================================================================
--- /paper-tape-project/trunk/visualisator/Makefile (revision 72)
+++ /paper-tape-project/trunk/visualisator/Makefile (revision 73)
@@ -10,5 +10,5 @@
cli: cli.c lochstreifen.o
- $(CC) $(CAIRO_CFLAGS) $^ $(CAIRO_LIBS) -o $@
+ $(CC) $(CAIRO_CFLAGS) $^ $(CAIRO_LIBS) -lm -o $@
gtkpapertape.o: gtkpapertape.cc gtkpapertape.h
@@ -34,3 +34,3 @@
clean:
- rm -v *.o cli gtk
+ rm -fv *.o cli gtk
Index: /paper-tape-project/trunk/visualisator/cli.c
===================================================================
--- /paper-tape-project/trunk/visualisator/cli.c (revision 72)
+++ /paper-tape-project/trunk/visualisator/cli.c (revision 73)
@@ -249,6 +249,6 @@
int x, color; // iterators
long color_value[4]; // interpreted numbers
- char *buf = "xy"; // Buffer for strtol <- one color value
-
+ char buf[3] = "xy"; // Buffer for strtol <- one color value
+
// remove a "#" char if present
if(string[0] == '#')
@@ -260,4 +260,5 @@
// copy the current character to buffer, first position
buf[0] = string[x];
+
// if short notation (shorter than AABBCC), dublicate
// current character to buffer second position, else
@@ -267,8 +268,8 @@
color_value[color] = strtol(buf, NULL, 16);
}
-
- DPRINTF("Allocating '%s' as #%x%x%x%x\n", string,
- color_value[0], color_value[1], color_value[2], (color == 4) ? color_value[3] : 0xFF);
-
+
+ DPRINTF("Allocating '%s' as #%02x%02x%02x%02x\n", string,
+ (unsigned int) color_value[0], (unsigned int) color_value[1], (unsigned int)color_value[2], (color == 4) ? (unsigned int) color_value[3] : 0xFF);
+
return cairo_pattern_create_rgba(
(double) color_value[0] / (double) 0xFF,
@@ -415,6 +416,6 @@
}
- lochstreifen_print_debug(l);
- exit(0);
+ if(verbosity!=0)
+ lochstreifen_print_debug(l);
// setting up the surface and painting...
Index: /paper-tape-project/trunk/visualisator/lochstreifen.c
===================================================================
--- /paper-tape-project/trunk/visualisator/lochstreifen.c (revision 72)
+++ /paper-tape-project/trunk/visualisator/lochstreifen.c (revision 73)
@@ -940,7 +940,7 @@
cairo_user_to_device(cr, &x, &y);
cairo_user_to_device_distance(cr, &width, &height);
- printf("draw: %i|%i %ix%i ", (int)x, (int)y, (int)width, (int)height);
- } else printf("draw: ");
- printf("row %i->%i track %i->%i\n", row, row_max, track_min, track_max);
+ //printf("draw: %i|%i %ix%i ", (int)x, (int)y, (int)width, (int)height);
+ } //else printf("draw: ");
+ //printf("row %i->%i track %i->%i\n", row, row_max, track_min, track_max);
// loop all the rows (bytes)
@@ -998,5 +998,5 @@
}
- printf("testing byte\n");
+ //printf("testing byte\n");
if( ((l->data[row] >> track) & 0x01) != 0x01) {
// bit is logical ZERO (0)
Index: /paper-tape-project/trunk/web-frontend/INSTALL.txt
===================================================================
--- /paper-tape-project/trunk/web-frontend/INSTALL.txt (revision 73)
+++ /paper-tape-project/trunk/web-frontend/INSTALL.txt (revision 73)
@@ -0,0 +1,11 @@
+INSTALLATION
+============
+
+This PHP script works out of the box if
+
+ 1. Directory "temp/" in this directory is web server writable:
+ $ chmod 777 temp
+
+ 2. The PaperTape drawing/visualisation CLI app is compiled.
+ $ cd ../visualisator
+ $ make cli
Index: /paper-tape-project/trunk/web-frontend/design/formular.js
===================================================================
--- /paper-tape-project/trunk/web-frontend/design/formular.js (revision 72)
+++ /paper-tape-project/trunk/web-frontend/design/formular.js (revision 73)
@@ -28,10 +28,19 @@
// 2. Submit abänder
+ /*
var button = document.getElementById("submit-button");
button.setAttribute("type", "button");
button.setAttribute("onclick", "new POST().submitForm(document.forms[0], getHttpRes);");
+ */
+ $(function(){
+ // 2013: auf jquery umgestiegen von Teleport
+ $("form").submit(function(){
+ $.post($("form").attr("action"), $("form").serialize(), getHttpRes);
+ return false; // Da per jquery
+ });
+ });
// 3. und dieses Teleport-Teil starten
- Init.run('BODY');
+ // Init.run('BODY');
}
@@ -58,10 +67,16 @@
+/*
function getHttpRes(msg, state, extra){
// Ajax-Antwort kriegen, mit diesem Teleport-Teil
if(state != __RPC_SUCCESS__) return alert("Konnte nicht zu Server verbinden!");
+*/
+function getHttpRes(data, textStatus, jqXHR) {
+ // Ajax-Antwort kriegen, mit diesem Teleport-Teil
+ //if(state != __RPC_SUCCESS__) return alert("Konnte nicht zu Server verbinden!");
+
// nachricht checken:
- if(msg == "ok") {
+ if(data == "ok") {
// weitermachen. Formular abschicken!
document.getElementById('ajax-output').innerHTML = "
Alle Eingaben richtig, Lochstreifen wird erstellt...
";
@@ -77,5 +92,5 @@
} else {
var forword = "
Es sind Fehler in den Eingaben aufgetreten, daher kann der Lochstreifen noch nicht erstellt werden. Bitte berichtigen sie diese Fehler und klicken sie dann nochmals auf \"Lochstreifen generieren\"
").append(x.parseHTML(e)).find(r):e)}).complete(n&&function(e,t){s.each(n,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ut,type:"GET",isLocal:Kt.test(Xt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?cn(cn(e,x.ajaxSettings),t):cn(x.ajaxSettings,e)},ajaxPrefilter:un(rn),ajaxTransport:un(on),ajax:function(e,t){"object"==typeof e&&(t=e,e=undefined),t=t||{};var n,r,i,o,s,a,u,l,c=x.ajaxSetup({},t),p=c.context||c,f=c.context&&(p.nodeType||p.jquery)?x(p):x.event,h=x.Deferred(),d=x.Callbacks("once memory"),g=c.statusCode||{},m={},y={},v=0,b="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===v){if(!o){o={};while(t=Qt.exec(i))o[t[1].toLowerCase()]=t[2]}t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===v?i:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return v||(e=y[n]=y[n]||e,m[e]=t),this},overrideMimeType:function(e){return v||(c.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>v)for(t in e)g[t]=[g[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||b;return n&&n.abort(t),k(0,t),this}};if(h.promise(T).complete=d.add,T.success=T.done,T.error=T.fail,c.url=((e||c.url||Ut)+"").replace(Gt,"").replace(en,Xt[1]+"//"),c.type=t.method||t.type||c.method||c.type,c.dataTypes=x.trim(c.dataType||"*").toLowerCase().match(w)||[""],null==c.crossDomain&&(a=tn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===Xt[1]&&a[2]===Xt[2]&&(a[3]||("http:"===a[1]?"80":"443"))===(Xt[3]||("http:"===Xt[1]?"80":"443")))),c.data&&c.processData&&"string"!=typeof c.data&&(c.data=x.param(c.data,c.traditional)),ln(rn,c,t,T),2===v)return T;u=c.global,u&&0===x.active++&&x.event.trigger("ajaxStart"),c.type=c.type.toUpperCase(),c.hasContent=!Zt.test(c.type),r=c.url,c.hasContent||(c.data&&(r=c.url+=(Vt.test(r)?"&":"?")+c.data,delete c.data),c.cache===!1&&(c.url=Jt.test(r)?r.replace(Jt,"$1_="+Yt++):r+(Vt.test(r)?"&":"?")+"_="+Yt++)),c.ifModified&&(x.lastModified[r]&&T.setRequestHeader("If-Modified-Since",x.lastModified[r]),x.etag[r]&&T.setRequestHeader("If-None-Match",x.etag[r])),(c.data&&c.hasContent&&c.contentType!==!1||t.contentType)&&T.setRequestHeader("Content-Type",c.contentType),T.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+("*"!==c.dataTypes[0]?", "+sn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)T.setRequestHeader(l,c.headers[l]);if(c.beforeSend&&(c.beforeSend.call(p,T,c)===!1||2===v))return T.abort();b="abort";for(l in{success:1,error:1,complete:1})T[l](c[l]);if(n=ln(on,c,t,T)){T.readyState=1,u&&f.trigger("ajaxSend",[T,c]),c.async&&c.timeout>0&&(s=setTimeout(function(){T.abort("timeout")},c.timeout));try{v=1,n.send(m,k)}catch(C){if(!(2>v))throw C;k(-1,C)}}else k(-1,"No Transport");function k(e,t,o,a){var l,m,y,b,w,C=t;2!==v&&(v=2,s&&clearTimeout(s),n=undefined,i=a||"",T.readyState=e>0?4:0,l=e>=200&&300>e||304===e,o&&(b=pn(c,T,o)),b=fn(c,b,T,l),l?(c.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(x.lastModified[r]=w),w=T.getResponseHeader("etag"),w&&(x.etag[r]=w)),204===e||"HEAD"===c.type?C="nocontent":304===e?C="notmodified":(C=b.state,m=b.data,y=b.error,l=!y)):(y=C,(e||!C)&&(C="error",0>e&&(e=0))),T.status=e,T.statusText=(t||C)+"",l?h.resolveWith(p,[m,C,T]):h.rejectWith(p,[T,C,y]),T.statusCode(g),g=undefined,u&&f.trigger(l?"ajaxSuccess":"ajaxError",[T,c,l?m:y]),d.fireWith(p,[T,C]),u&&(f.trigger("ajaxComplete",[T,c]),--x.active||x.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,t){return x.get(e,undefined,t,"script")}}),x.each(["get","post"],function(e,t){x[t]=function(e,n,r,i){return x.isFunction(n)&&(i=i||r,r=n,n=undefined),x.ajax({url:e,type:t,dataType:i,data:n,success:r})}});function pn(e,t,n){var r,i,o,s,a=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),r===undefined&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):undefined}function fn(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===undefined&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),x.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(r,i){t=x("
+
+
@@ -94,5 +95,5 @@
Text generieren
- Mit dem Eingeben von Buchstaben wird das entsprechende Bitmuster – wie im Bild gezeigt – generiert.
+ Mit dem Eingeben von Buchstaben wird das entsprechende Bitmuster, wie im Bild gezeigt, generiert.
:
@@ -351,5 +352,5 @@
Diese Online-Lochstreifenvisualisierung obliegt gewisser Beschränkungen (maximal 1MB Datenmenge, die
visualisiert wird). Mit der Offline-Variante gibt es diese Beschänkungen nicht. Und so sieht sie aus:
-
+
Es handelt sich um ein GTK-Programm, welches
genau das gleiche System nutzt, wie diese Onlineversion. Sie vereint alle Möglichkeiten, die das